
#include <stdio.h>
#include <math.h>

int main(){
    long long n, i, j, yaku, count;
    while (scanf("%lld",&n) != EOF) {
        count=1;
        if (n==1) {
            printf("%d\n",0);
        }
        else if (n==2){
            printf("%d\n",1);
        }
        else{
            for (i=3; i<=n; i+=2) {
                yaku=0;
                for (j=3; j<=sqrt(i); j+=2) {
                    if (i%j == 0) {
                        yaku=1;
                        break;
                    }
                }
                if (yaku == 0) {
                    count++;
                }
            }
            printf("%lld\n",count);
        }
    }
    
    
    return 0;
}