#include <iostream>
#include <algorithm>
#include <stdlib.h>
#include <iomanip>
#include <string>
#include <cmath>
#define PI 3.14159265359
using namespace std;

bool prime_judge(int x)
{
	for (int i = 2; i < x; ++i) {
		if (x%i == 0)return false;
	}
	return true;
}

int main()
{
	int x, ans;
	while (cin >> x) {
		ans = 0;
		for (int i = 2; i <= x;++i) {
			if (prime_judge(i))++ans;
		}
		cout << ans << endl;
	}
	return 0;
}