#include <stdio.h>
#include <math.h>
#include <stdbool.h>
// 判断质数:
bool Prime(int x) {
if (x == 1)
return false;
int y = sqrt(x);
for (int i = 2; i <= y; i++) {
if (x % i == 0)
return false;
}
return true;
}
int main()
{
int n;
scanf("%d",&n);
int i=1;
int count=0;
while (i) {
if(Prime(i))
{
count++;
if(count==n)
{
printf("%d\n",i);
break;
}
i++;
}
else
{
i++;
}
}
return 0;
}

京公网安备 11010502036488号