#include<iostream>
using namespace std;
int main()
{
    int a,f,counter;
    while(cin>>a)
    {
        counter=1;
        for(int i=3;i<=a;i++)
        {
            f=0;
            for(int j=2;j<i;j++)
            {
                if(i%j==0)
                {
                    f=1;
                    break;
                }
            }
            if(f==0)
                counter++;
        }
        cout<<counter<<endl;
    }
    return 0;
}