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