#include<iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <math.h>
using namespace std;
#include <sstream>
typedef long double ld;
int a;
int isprime(int aa) {
	if (aa == 1)
		return 0;
	for (int i = 2; i * i <= aa; ++i) {
		if (aa % i == 0) {
			return 0;
		}
	}
	return 1;
}

int main() {
	while (cin >> a) {
		int cnt = 0;
		for (int i = 1; i <= a; ++i) {
			if (isprime(i)) {
				cnt++;
			}
		}
		cout << cnt << endl;
	}
}