#include<iostream>

using namespace std;

int main(void)
{
	int n;
	while(cin >> n){
		int sosu = 0;
		for(int i = 2; i <= n; i++){
			int count = 0;
			for(int j = 1; j <= i; j++){
				if(i % j == 0) {
					count++;
				}
			}
			if(count == 2) sosu++;
		}
		cout << sosu << endl;
	}
	return 0;
}