#include using namespace std; using ll =long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll N; cin>>N; ll an=0; for(ll p=2;p*p<=N;p++){ bool OK=1; for(ll x=2;x*x<=p;x++)if(p%x==0){ OK=0; break; } if(!OK)continue; ll r=p; while(r*p<=N){ r*=p; an+=r; } } cout<