#include #include #define chmin(x,y) (x) = min((x),(y)) #define chmax(x,y) (x) = max((x),(y)) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define vec vector #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define pb push_back #define eb emplace_back using namespace std; using namespace atcoder; using ll = long long; using ld = long double; const ll mod = 998244353; using mint = modint998244353; const vector dx = {1,0,-1,0}, dy = {0,1,0,-1}; // using Graph = vector>>; using Graph = vector>; ll pow_ll(ll p, int n){ ll res = 1; rep(i,n) res *= p; return res; } int main(){ // input ll N; cin >> N; // prep const int M = 100000; vector is_p(M+1,0); for(int x = 2; x <= M; x++){ int z = x; for(int y = 2; y * y <= z; y++){ if(z % y == 0){ z /= y; break; } } if(z == x) is_p[x] = 1; } // solve ll ans = 0; set st; for(int n = 2; (1LL< N) break; if(!st.count(X)){ // cerr << X << "\n"; ans += X; } st.insert(X); } } // output cout << ans << endl; }