#include <iostream>
#include <math.h>
using namespace std;

bool check_prime_number (int n) {
    if ( n <= 1 ) return false;

    for (int i = 2; i <= sqrt(n); ++i) {
        if (n % i == 0) return false;
    }

    return true;
}

int count_prime_number (int n) {
    int count = 0;

    if (n == 1) return 0;
    for (int i = 2; i <= n; ++i) {
        if (check_prime_number(i)) {
            count++;
        }
    }

    return count;
}

int main() {
    int n;
    while (cin >> n) {
        cout << count_prime_number(n);
    }
    return 0;
}