/*
project euler problem 7: 求第 10001 个质数
answer: 104743
*/
#include<bits/stdc++.h>
using namespace std;
const int N = 200000;
int st[N];
int main(void)
{
vector<int> primes;
for (int i = 2; i < N; ++i)
{
if (st[i]) continue;
primes.push_back(i);
for (int j = 2; j * i < N; ++j)
st[j * i] = 1;
}
//for (auto& x: primes) cout << x << endl;
//cout << primes.size() << endl;
cout << primes[10001 - 1] << endl;
return 0;
}