#include<cstdio>
#include<iostream>

using namespace std;

int main(){
        int i=2,j=2,n,count=0;
        while(scanf("%d",&n) != EOF){
                while(i <= n){
                        while(j <= i){
                                if(i%j == 0) break;
                                j++;
                        }
                        if(j == i){
                                count++;
                        }
                        i++;
                        j = 2;
                }
                i = 2;
                cout << count <<endl;
                count = 0;
        }
        return 0;
}