#include using namespace std; bool isPrime(int x){ if(x==1)return 0; if(x==2)return 1; for(int i=2;i*i<=x;i++)if(x%i==0)return 0; return 1; } int main(){ int N; cin>>N; priority_queue, greater> Q; Q.push(1); for(long i=100001;i<=105220;i++){ for(long long j=100001;j<=105220;j++){ if(isPrime(i)&&isPrime(j))Q.push(i*j); } } for(int i=1;i<=N-1;i++){ Q.pop(); } cout<