#include <iostream>
using namespace std;

int main()
{
	int n = 0, x = 0;
	int countdata[1000];
	while (cin >> n) {
		int count = 0;
		for (int a = 2; a <= n; a++) {
			int count2 = 0;
			for (int b = 2; b <= a / 2; b++) {
				if (a%b != 0)
					count2++;
			}
			if (count2==a/2-1)
				count++;
		}
		countdata[x] = count;
		x++;
	}
	for (int a = 0; a < x; a++) {
		cout << countdata[a] << endl;
	}
}