#include using std::cin; using std::cout; using std::vector; using P = std::pair; vector

factorize(int n) { vector

res; for (int i = 2; i * i <= n; ++i) { if (n % i) continue; res.emplace_back(i, 0); while (n%i == 0) { n /= i; res.back().second++; } } if (n != 1) res.emplace_back(n, 1); return res; } int main() { int n; cin >> n; auto f = factorize(n); int ans = 0; for (auto [x, y] : f) { ans += x*y; } cout << ans << '\n'; return 0; }