#include using ll = long long; using namespace std; int main() { ll n; cin >> n; if (n == 1) { cout << "1\n"; return 0; } ll t{ n }, pf{ 2 }; map m; while (t >= pf * pf) { if (!(t % pf)) { ++m[pf]; t /= pf; } else { ++pf; } } ++m[t]; ll res{ 1 }; for (const auto& im : m) res *= (pow(im.first, im.second + 1) - 1) / (im.first - 1); cout << res << "\n"; return 0; }