#include <iostream>

int main() {
	int n;
	while (std::cin >> n)
	{
		int c = 0;
		for (int i = 2; i <= n; ++i) {
			int j = 2;
			while (i%j)
			{
				++j;
			}
			if (i == j) {
				++c;
			}
		}
		std::cout << c << std::endl;
	}
	}