#include <bits/stdc++.h> using namespace std; int main(){ int i,n=0; cin>>i; if(i%2==1){ for(int k=2;k<i;k+=2)n+=k; }else{ for(int k=1;k<=i;k++){ if(i%k==0)n+=k; } } cout<<n; } /************************************************************** Problem: 1060 User: wangyiyang Language: C++ Result: Accepted Time:7 ms Memory:2072 kb ****************************************************************/