#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); constexpr array p = { 100003, 100019, 100043, 100049, 100057, 100069, 100103, 100109, 100129, 100151 }; vector arr; arr.push_back(1); for (ll x : p) { for (ll y : p) { arr.push_back(x * y); } } sort(arr.begin(), arr.end()); arr.erase(unique(arr.begin(), arr.end()), arr.end()); int n; cin >> n; assert(arr.size() > n); cout << arr[n - 1] << '\n'; return 0; }