#include <cmath>
#include <iostream>
#include <vector>

using namespace std;

int sosuu(int n) {
    vector< int > list;
    for (int i = 2; i <= n; i++) {
        list.push_back(i);
    }
    int count = 0;
    int p;
    while (true) {
        p = list[count];
        count++;
        for (int i = 0; i < list.size(); i++) {
            if (list[i] % p == 0 && list[i] != p) {
                list.erase(list.begin() + i);
                i--;
            }
        }
        if (list.size() > sqrt(n)) break;
    }
    // for (int i = 0; i < list.size(); i++) {
    //     cout << list[i] << " ";
    // }
    // cout << endl;
    return list.size();
}

int main() {
    int a;
    while (!cin.eof()) {
        cin >> a;
        if (std::cin.fail()) break;
        cout << sosuu(a) << endl;
    }

    return 0;
}