#include using namespace std; #define MOD 1000000007 #define N 100005 bool checkprime(long long n){ long long i; if(n <= 1) return false; if(n <= 3) return true; if(n%2 == 0 || n%3 == 0) return false; for(i=5; i*i <= n; i+=6){ if((n%i == 0) || (n%(i+2) == 0)){ return false; } } return true; } int main(){ ios::sync_with_stdio(false); //freopen("input.txt", "r", stdin); int i, n; cin>>n; long long x; long long ans = 0; for(i=0; i>x; if(sqrt(x)*sqrt(x) == x){ ans += 2*(x-1) + 1; } else if(checkprime(x)){ ans += (x+1); } else{ ans += 2*(x-1); } } cout<