#include<iostream>
#include<cstdio>
using namespace std;
int main(){
    int a,b,c,i,j;
    while(scanf("%d",&a)!=EOF){
        b=0;
        for(i=2;i<=a;i++){
            c=0;
            for(j=2;j*j<=i;j++){
                if(i%j==0){c++;break;}
            }
            if(i==2||i==3)c++;
            if(c==0)b++;
            if(i==2||i==3)b++;
        }
        cout<<b<<endl;
    }
    return 0;
}