#include<iostream>
#include<cmath>

using namespace std;

int N,ans=1;

int IsPrime(int p) {
	double n = sqrt(p);
	for (int i = 3; i <= n; i++) {
		if (p%i == 0)return 0;
	}
	return 1;
}

int main() {
	while (cin >> N) {
		//double n = sqrt(N);
		for (int i = 3; i <= N; i = i + 2) {
			ans += IsPrime(i);
		}
		cout << ans << endl;
		ans = 1;
	}
	return 0;


}
