#include <iostream>
#include <cmath>

bool CheckPrimeNumber(int number) {
	int max = (int)std::sqrt(number);
	for (int i=2; i<=max; i++)
		if (number % i == 0)
			return false;
	return true;
}

int main() {
	int n, cnt;
	while (std::cin >> n) {
		cnt = 0;
		for (int i=2; i<=n; i++)
			if (CheckPrimeNumber(i))
				cnt++;
		std::cout << cnt << std::endl;
	}
	return 0;
}
