#include<bits/stdc++.h>
using namespace std;
long long n,i,t,j=0,l,m=0;
bool tf(int n)
{
if(n<2)
return false;
for(i=2;i*i<=n;i++)
if(n%i==0)
return false;
return true;
}
int main(){
cin>>l;
while(t<l)
{
if(t<l)
{
do{
j++;
}
while(tf(j)==false);
m++;
cout<<j<<endl;
t+=j;
}
}
cout<<m;
}