#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define rep(i,n) for(int i=0;i=0;i--) #define all(v) (v).begin(),(v).end() #define stop char nyaa;cin>>nyaa; using P = pair; using ll = long long; using LP = pair; const ll inf = 1000000007; const ll INF = inf * inf; bool isp(int x) { int k = sqrt(x + 0.1); for (int j = 2; j <= k + 1; j++) { if (j != x) { if (x%j == 0)return false; } } return true; } void solve() { int n; cin >> n; vector anss; anss.push_back(1); int cur = 100000; while (anss.size() < 10) { bool valid = true; if (!isp(cur))valid = false; for (int i = 2; i <= 100000; i++) { if (cur%i == 0)valid = false; } if (valid)anss.push_back(cur); cur++; } cout << anss[n - 1] << "\n"; } signed main() { cin.tie(0); ios::sync_with_stdio(false); //int t; cin >> t;rep(i, t)solve(); solve(); //stop return 0; }