#include #include #include int main() { int N; std::cin >> N; const int K = 200000; std::vector u; std::vector v(K); for (int i = 2; i < K; i++) { if (v[i] == true) continue; if (i > 100000) { u.push_back(i); if (u.size() > 10) break; continue; } for (int j = i; j < K; j += i) { v[j] = true; } } std::vector w = {1}; for (int i = 0; i < 11; i++) { for (int j = i + 1; j < 11; j++) { w.push_back(u[i] * u[j]); } } sort(w.begin(), w.end()); std::cout << w[N - 1] << "\n"; }