#include<iostream>
#include<vector>

using namespace std;

vector<int> PrimeNumber;
int p = 0;

int f(int x){
	if (x == 2) {
		PrimeNumber.push_back(x);
		return 1;
	}
	for (int i = 0; i < PrimeNumber.size(); i++){
		if (x%PrimeNumber[i] == 0) return 0;
	}
	PrimeNumber.push_back(x);
	return 1;
}

int main(){
	long int n;
	int ans = 0;
	while (cin >> n){
		ans = 0;
		PrimeNumber.clear();
		for (int i = 2; i <= n; i++){
			ans += f(i);
		}
		cout << ans << endl;
	}
}