///bismillah_hir_rahmanir_rahim
///GALIB-2015331528

#include<bits/stdc++.h>
using namespace std;

int prime[1000000];
int main()
{
    int n,c;
    cin>>n;
    if(n==1){
        cout<<"0"<<endl;
        return 0;
    }

    c=1;
    for(int i=3;i<=n;i+=2){
        if(prime[i]==0){
            c++;
            for(int j=3;i*j<=n;j+=2)
                prime[i*j]=1;
        }
    }

    cout<<c<<endl;




    return 0;
}