#include <iostream>
#include <cmath>
using namespace std;
int main(void){
    int n;
    while(cin>>n){
        int ans=0;
        for(int i=2;i<=n;i++){
            int sum=0;
            for(int j=1;j<=pow(i,0.5);j++){
                if(i%j==0)sum++;
                if(sum==2)break;
            }
            if(sum==1)ans++;
        }
        cout<<ans<<endl;
    }
    return 0;
}