#include <iostream>

using namespace std;
int main()
{
    long long n;
    long long prime = 0;

    cin >> n;
    
    for(int x=1; x<=n; x++)
    {
            int counter = 0;
            for(int y=1; y<=x; y++)
            {
                    if(x%y==0)
                    counter++;
            }
            
            if(counter==2)
            {
                    cout << x << endl;
                    prime++;
            }
    }
    
    cout << prime << endl;
    
return 0;
}