#include <iostream>

bool prime(int n);

int main(void) {
	using namespace std;
	int x;
	int count;
	while (cin >> x) {
		count = 0;
		for (int i = 2; i <= x; i++) {
			if (prime(i))count++;
		}
		cout << count << endl;
	}
	return 0;
}

bool prime(int n) {
	static int flag = 0; 
	static int count = 0;
	static int list[78498];

	if (flag == 1) {
		for (int j = 0; j < count; j++) {
			if (n % list[j] == 0 ) {
				if (n == list[j]) {
					return true;
				}
				
				return false;
				
				
			}
		}
	}

	
	flag = 1;
	list[count] = n;
	count++;
	return true;
}