#include <iostream>
#include <vector>

static void InputData(std::vector<int>& v)
{
	int n = 0;

	if (0x00 == &v) {
		std::cerr << "vec is null" << std::endl;
		return;
	}
	while (std::cin >> n) {
		v.push_back(n);
	}
}

static int getPrimeNumber(int n)
{
    int cnt = 0;

    for (int i = 2; i <= n; i++) {
	for (int j = 2; j <=i; j++) {

	    if (i == j) {
		cnt++;
	    }
	    if (0 == i % j) {
		break;
	    }
	}
    }

    return cnt;
}

static bool printPrimeNumber(std::vector<int>& v)
{
	if (0x00 == &v) {
		std::cout << "v is null" << std::endl;
		return false;
	}
	for (int i = 0; i < v.size(); i++) {
		std::cout << getPrimeNumber(v.at(i)) << std::endl;
	}

	return true;
}

int main()
{
	std::vector<int> vec;

	InputData(vec);
	printPrimeNumber(vec);

	return 0;
}