#include #include #include using namespace std; using LL = long long; using ULL = unsigned long long; LL P[]{ 100003, 100019, 100043, 100049, 100057, 100069, 100103, 100109, 100129, 100151, 100153, }; int main() { int N; cin >> N; vector ans; ans.push_back(1); for (int i = 0; i < 11; i++) { for (int j = 0; j < 11; j++) { ans.push_back(P[i] * P[j]); } } sort(ans.begin(), ans.end()); cout << ans[N - 1] << endl; }