#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; using ull = unsigned long long; int bsf(ull x) { return __builtin_ctzll(x); } struct fastset{ int N,lg; vector> seg; fastset(int N):N(N){ while(N>1){ seg.push_back(vector((N+63)/64)); N=(N+63)/64; } lg=seg.size(); } void ins(int x){ for(int i=0;i>R; if(!B){ x=x/64+1; continue; } // find x+=bsf(B); for(int j=i-1;j>=0;j--){ x*=64; int D=x/64; x+=bsf(seg[j][D]); } return x; } return N; } }; int N=1000100; bool isnotprime[1000100]; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); vector pri; for(int i=2;i1e5)pri.push_back(i); for(int j=i+i;j> n; vector v; for(int i=0;i<10;i++){ for(int j=0;j<10;j++){ v.push_back(pri[i]*pri[j]); } } if(n==1){ printf("1\n"); return 0; } sort(v.begin(), v.end()); cout << v[n-2] << endl; }