#include using namespace std; #define ll long long #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define Pr pair #define Tp tuple using Graph = vector>; ll mod = 998244353; int main() { ll N; cin >> N; ll nsf[N+1]; rep(i,N+1){ nsf[i] = i; } for(ll i=1;i<=N;i++){ if(nsf[i]==i){ rep(j,N){ if(i*j*j>N) break; nsf[i*j*j] = i; } } } ll counter[N+1]; ll k = N; rep(i,N+1){ while((ll)i*k*k>N) k--; counter[i] = k; } ll ans = 0; rep(i,N){ ans += counter[nsf[i+1]]; } cout << ans << endl; }