#include<iostream>

using namespace std;

int main(){
    int n;
    while (cin >> n){
        int result = 0;
        for (int i = 2; i <= n; i++){
            for (int j = 2; j <= i; j++)
            {
                if (i == j)result++;
                if (i%j == 0)break;
            }
        }
        cout << result << endl;
    }


    return 0;
}