/// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0009
/// http://www.tsg.ne.jp/TT/tsg/c/mansaku/P01.html
#include<cstdio>
#include<cmath>

int main(){
    int n, cnt=0;
    scanf("%d", &n);
    for(int i = 3; i<=n; i+=2){
        int k= 0;
        for(int j=3; j<sqrt(i); j+=2){
            if(i%j==0){
                k=1;
                break;
            }
        }
        if(k==0) cnt++;
    }
    printf("%d\n", cnt);

    return 0;
}

