#include using namespace std; using ll = long long; ll sus(ll N) { ll sum = 0; for (ll i = 1; i * i <= N; ++i) { if (N % i == 0) { sum += i; if (i != N / i) sum += N / i; } } return sum; } signed main() { cin.tie(nullptr) -> sync_with_stdio(false); cout.tie(nullptr); #ifdef BACHS freopen("baitap.inp", "r", stdin); freopen("baitap.out", "w", stdout); #endif ll N; cin >> N; cout << sus(N) << endl; return 0; }