#include <stdio.h>

int main(void){
    int n;
    int cnt;
    int prm;

    while (scanf("%d", &n)!= EOF){
        cnt = 0;
        for(int i=2; i<=n; i++){
            prm=1;
            for (int j=2; j*j<= i; j++){
                if (i%j==0){
                    prm=0;
                    break;
                }
            }
            cnt+=prm;
        }
        printf("%d\n", cnt);
    }

    return 0;
}