#include <iostream>

int prime_numbers[999999];
int cur_index = 4;

bool is_prime(int p) 
{
    for (int i = 0; i < cur_index; i++) {
        if (p % prime_numbers[i] == 0) {
            return false;
        }
    }
    return true;
}

int main(void)
{
    prime_numbers[0] = 2;
    prime_numbers[1] = 3;
    prime_numbers[2] = 5;
    prime_numbers[3] = 7;

    long long int n;
    std::cin >> n;

    for (int i = 8; i <= n; i++) {
        if (is_prime(i)) {
            prime_numbers[cur_index] = i;
            cur_index++;
        }
    }

    std::cout << cur_index << std::endl;
    return 0;
}