#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a=0; int s=0; for(int i=2;i<=sqrt(n);i++) { if(n%i==0) { a+=i; s+=a; s+=n/a; } } cout<<s+1; return 0; } /************************************************************** Problem: 1084 User: chenkexin Language: C++ Result: Wrong Answer ****************************************************************/