#include<bits/stdc++.h>
using namespace std;
bool check(int x)
{
if(x==2) return 1;
for(int i=2;i<=sqrt(x);i++)
if(x%i==0) return 0;
return 1;
}
int main(){
int l,sum=0,c=0,y=2;
cin>>l;
while(sum+y<l){
if(check(y)==0){
cout<<y<<endl;
c++;
sum+=y;
y++;
}
}
cout<<c<<endl;
return 0;
}