#include <iostream>

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