#include <iostream>

using namespace std;

bool isPrime(int n){
	
	if (n == 1)
		return false;
	if (n == 2)
		return true;

	for (int i = 2; i*i <= n; ++i){
		if (n % i == 0)
			return false;
	}
	return true;
}

int main(){
	int n;

	while (cin >> n){
		int c = 0;
		for (int i = 1; i <= n;++i){
			if (isPrime(i))
				++c;
		}
		cout << c << endl;
	}
	return 0;
}