#include <iostream>
#include <vector>
using namespace std;

int main() {
	vector<int> primes;
	primes.push_back(2);
	primes.push_back(3);
	for (int n = 4; n != 999; ++n) {
		bool isPrime = true;
		for (int i = 0; i != primes.size(); ++i) {
			if (n % primes[i] == 0) {
				isPrime = false;
			}
		}
		if (isPrime) {
			primes.push_back(n);
		}
	}

	int n;
	while (cin >> n) {
		int count = 0;
		for (int i = 0; i != n; ++i) {
			if (primes[i] <= n)
				++count;
			else 
				break;
		}
		cout << count << endl;
	}

	return 0;
}