#include<iostream>
using namespace std;
int main() {
int L; int a = 0; int ans = 0;
cin >> L;
for (int i = 2; ; i++)
{
a += i;
for (int j = 2; j * j <= i; j++)
{
if (i % j != 0)
{
cout << i << endl;
ans++;
}
}
if (a > L)
{
break;
}
}
cout << ans << endl;
system("pause");
return 0;
}