#include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <sstream>
 
using namespace std;
 
int main(){
    int n;
    int count = 0;
    while(cin >> n){
        count = 0;
        for(int i = 2; i <= n; i++){
            for(int j = 2; j <= i; j++){
                if(i - j > 0) if(i % j == 0) break;
                i - j || i % j || count++;
            }
        }
        cout << count << endl;
    }
    return 0;
}