#include"bits/stdc++.h" //#include using namespace std; #define print(x) cout<> n; ll ans = 1; for (ll i = 2; i*i <= n; i++) { if (n%i == 0) { ans += i; if (n / i != i)ans += n / i; } } if (n % 2 == 1)ans += n; print(ans); return 0; }