#include <bits/stdc++.h>
using namespace std;
int main()
{
int i,j,n,max; string snt,p;
snt[0] = snt[1] = false;
for(i = 2; i <= max; i++)
{
if (snt[i])
{ for(j = i*2; j <= max; j+=i)
{ snt[j] = false; }
}
}
j=0;
for(i=2;i<max;i++)
if (snt[i])
{j++;p[j]=i;}
ifstream fi("prime.inp");
ofstream fo("prime.out");
fi>>n;
for (i=1;i<=n;i++) cout<<p[i]<<" ";
fo<<p[n];
fi.close(); fo.close();}
