#include<iostream>
#include<stack>
using namespace std;
int main() {
	int n,ans=0,i,count=0;
	while (cin >> n) {
		for (i = 2; i <= n; i++) {
			for (int j = 2; j <= i; j++) {
				if (i%j == 0) {
					count++;
				}
			}
			if (count == 1) {
				ans++;
			}
			count = 0;
		}
		cout << ans << endl;
		ans = 0;
	}
	return 0;
}