#include <iostream>
#include <cmath>

int count_prime_number(int);

int main(void){

    int n;
    while(scanf("%d",&n) != EOF){
        std::cout << count_prime_number(n) << std::endl;
    }   
                                                                                                                                                               
    return 0;
}

int count_prime_number(int n){ 

    int f,prime_num = 1;

    if (n == 2) {
        prime_num = 1;
    }   
    else{
        for (int j = 3; j <= n; j += 2) {
            f = 0;
            for(int i = 3; i <= std::sqrt(n); i+=2){
                if (j%i == 0) {
                    f = 1;
                    break;
                }
            }   

            if (f == 0) {
                prime_num++;
            }   
        }
    }   

    return prime_num;

}