#include <iostream>
#include <cstdio>
using namespace std;

int main(int argc, const char * argv[])
{
    long int n;
    while (cin >> n) {
        int pnm = 0;
        for (long int i = 2; i <= n; i++) {
            int cnt = 0;
            for (long int j = 2; j <= i; j++) {
                if (i % j == 0) {
                    cnt++;
                }
            }
            if (cnt == 1) {
                pnm++;
            }
        }
        cout << pnm << endl;
    }
    
    return 0;
}