#include<bits/stdc++.h>
#include<math.h>
#include<cmath>
using namespace std;
int main() {
int n,s=0,x=2;
cin>>n;
while(s<=n){
int f=0;
for(int i=2;i<x;i++)
if(x%i==0){
f=1;
break;
}
if(s+x<=n&&f==0){
s+=x;
cout<<x<<endl;
}else if(s+x>n){
return 0;
}
x++;
}
return 0;
}