#include<iostream>
#include<cstring>
using namespace std;
void oula_countPrimes() {
int n;
cin >> n;
bool isPrime[500];
int Prime[500];
int num = 0;
memset(Prime, 0, sizeof(Prime));
memset(isPrime, true, sizeof(isPrime));
isPrime[0] = false;
isPrime[1] = false;
for (int i = 2; i <= n; i++) {
if (isPrime[i]) {
Prime[num++] = i;
}
for (int j = 0; j < num; j++) {
isPrime[i*Prime[j]] = false;
if (i%Prime[j] == 0)
break;
}
}
int i=0;
while(n-Prime[i]>0)
{
cout<<Prime[i]<<endl;
n=n-Prime[i];
i++;
}
cout << num << endl;
}
int main()
{
oula_countPrimes();
return 0;
}