#include <iostream>
#include <cmath>
using namespace std;

int num,sqt,cnt;

int main()
{
    while(cin>>num)
    {
       sqt=sqrt(num+0.5);
       if(num<=3)cnt=num-1;
       else{cnt=num-2;}
       for(int i=2;i<sqt;i++)
       {
           for(int j=i*2;j<=num;j+=i)
            {
                cnt--;
            }
       }
        cout<<cnt<<endl;
    }
}