#include using namespace std; int main() { int N; cin >> N; map mp; for( int i = 2; i * i <= N; i++ ) { while( N % i == 0 ) { mp[i]++; N /= i; } } if( N != 1 ) mp[N]++; int ans = 0; for( auto it = mp.begin(); it != mp.end(); it++ ) { ans += it->first * it->second; } cout << ans << endl; }