#include <iostream>
using namespace std;
int main(void)
{
    int n;
    while (cin >> n)
    {
        int c = 0;
        for (int i = 2; i <= n; i++)
        {
            int t = 1;
            for (int j = 2; j < i; j++)
            {
                if (i % j == 0)
                {
                    t++;
                }
            }
            if (t == 1)
            {
                c++;
            }
        }
        cout << c << endl;
    }
}

