#include<iostream>
using namespace std;

//素数かどうか判定する関数
bool judge( int x )
{
    int count = 0;

    for( int i = 1; i <= x; i++ )
    {
        if( x % i == 0)
            count++;
    }

    if( count == 2 )
        return true;
    else
        return false;
}

int main()
{
    int n;

    while( cin >> n )
    {
        int count = 0;

        for( int i = 1; i <= n; i++ )
        {
            if( judge(i) )
                count++;
        }

        cout << count << endl;
    }

    return 0;
}
