#include <fstream>
#include <iostream>
using namespace std;
bool sang[10000000];
int a[100000],d = -1;
int eratos(int m)
{
    for (int i = 2; i <= m; i++)
    if (sang[i] == true)
    {
        d++; a[d] = i;
        for (int j = i*2; j <= m; j += i)
        {
            sang[j] = false;
        }
    }
    return 0;
}
int main()
{
    ifstream f1("De001_2.inp");
    ofstream f2("De001_2.out");
    int n;
    f1>>n;
    for (int i = 2; i <= n; i++)
    {
        sang[i] = true;
    }
    eratos(n);
	for (int i = 0; i <= d; i++)
    {
        if (a[i] < n) f2<<a[i]<<endl;
    }
    return 0;
}
