#include <iostream>
#include <cmath>

using namespace std;

bool isprime(int n) {
	if (n < 2)
		return false;
	int lim = (int)sqrt((double)n);
	for (int i = 2; i <= lim; i++)
		if (!(n%i))
			return false;
	return true;
}

int main(void) {
	int n, total = 0;
	cin >> n;
	for (int i = 2; i <= n; i++) {
		if (isprime(i))
			total++;
	}
	cout << total << endl;
	return 0;
}