#include <stdio.h>int BP(int n)
{
int h,b;
for(h=2;h<n;h++)
{
if(n%h==0)
{
b = 0;
break;
}
else b = 1;
}
return b;
}
int main()
{
int L,m=2,sum=0,x=0;
scanf("%d",&L);
for(sum=0;sum<=L;)
while(sum<=L)
{
if(BP(m)!=0)
{
x++;
sum+=m;
if(sum<=L)
printf("%d\n",m);
}
m++;
}
printf("%d\n",x-1);
return 0;
}