#include #define rep(i,n) for(int i=(0);i<(n);i++) using namespace std; typedef long long ll; typedef pair pll; vector prime_factorize(ll n) { vector res; for (ll p = 2; p * p <= n; ++p) { if (n % p != 0) continue; int num = 0; while (n % p == 0) { ++num; n /= p; } res.push_back((pll){p, num}); } if (n != 1) res.push_back((pll){n, 1}); return res; } int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; ll ans = 1LL; auto v = prime_factorize(n); for(auto pk : v){ ll p = pk.first; ll k = pk.second; ll s = 0LL; ll t = 1LL; for(int i = 0; i < k+1; i++){ s += t; t *= p; } // cout << p << "," << s << endl; ans *= s; } cout << ans << endl; }