#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define rep(i, n) for(int(i) = 0; (i) < (n); (i)++) #define FOR(i, m, n) for(int(i) = (m); (i) < (n); (i)++) #define All(v) (v).begin(), (v).end() #define pb push_back #define MP(a, b) make_pair((a), (b)) using ll = long long; using pii = pair; using pll = pair; const int INF = 1 << 30; const ll LINF = 1LL << 60; const int MOD = 1e9 + 7; int main() { int N; cin >> N; N--; vector res; res.pb(1); vector ps = {100003, 100019, 100043, 100049, 100057, 100069, 100103, 100333, 100343, 100357}; int M = ps.size(); for(int i = 0; i < M; i++) for(int j = i + 1; j < M; j++) { res.pb(ps[i] * ps[j]); } sort(All(res)); cout << res[N] << endl; return 0; }