#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define eprintf(...) 42 #endif #define rep_(i, a_, b_, a, b, ...) for (int i = (a), i##_len = (b); i < i##_len; ++i) #define rep(i, ...) rep_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) #define reprev_(i, a_, b_, a, b, ...) for (int i = (b-1), i##_min = (a); i >= i##_min; --i) #define reprev(i, ...) reprev_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) #define all(x) (x).begin(), (x).end() template bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } // template T gcd(T a, T b) { return b ? gcd(b, a % b) : a; } using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair P; typedef long double ld; int main (void) { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector a {100003,100019,100043,100049,100057,100069,100103,100109,100129, 100151,100153,100169,100183}; vector b; for (ll i : a) { for (ll j : a) { b.push_back(i * j); } } b.push_back(1); sort(all(b)); cout << b[n - 1] << "\n"; return 0; }