#include using namespace std; bool isp(int n) { if (n < 2) return false; else if (n == 2) return true; else if (n % 2 == 0) return false; for (int i = 3; i <= (int)sqrt(n); i += 2) if (n % i == 0) return false; return true; } int main() { int N; cin >> N; if (N == 1) return cout << 1 << "\n", 0; for (int i = 100001, cnt = 1; ; i++) { if (isp) continue; cnt++; if (cnt == N) return cout << i << "\n", 0; } }