#include<iostream> using namespace std; int main(){ int a=2,b=0,n; cin>>n; cout<<2<<endl; for(int i=1;;i++){ for(int y=2;y<i;y++){ if(i%y==0){ break; } if(y==i-1){ a+=i; if(a>n){ b++; cout<<b; return 0; } else{ cout<<i<<endl; b++; } } } } }