#include using ll = long long; using namespace std; ll tinh(ll n) { ll ans=1, i=2, s; while(i*i<=n) { s=i; while(n%i==0) {n/=i; s*=i;} ans *= ((s-1)/(i-1)); ++i; } if(n>1) ans *= ((n*n-1)/(n-1)); return ans; } ll n; int main() { cin.tie(0)->sync_with_stdio(0); cin >> n; cout << tinh(n); return 0; }