#include<cstdio>
#include<iostream>
using namespace std;

void solve(int n) {
	int i, j, ans = 0;
	for (i = 2; i <= n; i++) {
		int num = 0;
		for (j = 2; j <= i; j++) {
			if (i%j == 0) num++;
		}
		if (num == 1) ans++;
	}
	cout << ans << endl;
}

int main() {
	int n;
	while (cin >> n) {
		cin >> n;
		solve(n);
	}
	return 0;
}