#include <iostream>

int main() {
	int input;
	// ??\???????????°????????????????????????????????????
	while (std::cin >> input) {
	int count = 0;
	for (; input > 1; input--) {
		bool fl = true;
		for (int i = 2; fl == true, i < input; i++)
			if (!(input % i))
				fl = false;

		if (fl)
			count++;
	}

			std::cout << count << std::endl;
	}
}