#include using namespace std; int main(){ int N,ans=0; cin>>N; for(int i=2;i<=N;++i){ while(!(N%i)){ N/=i; ans+=i; } } cout<