#include<iostream>
using namespace std;
int main() {
	int n;
	int ans[100000];
	int count = 0;
	int ans_count = 0;
	while (cin >> n) {
		for (int i = 1; i <= n; i++) {
			for (int j = 1; j <= n; j++) {
				if (i%j == 0 && j != 1 && j != i)
				{
					count++;
				}
			}
			if (count == 0) {
				ans_count++;
			}

			count = 0;

		}
		cout << ans_count - 1 << endl;
	}
	return 0;
}