#include<iostream>
#include<cmath>

using namespace std;

int isprime(int x){
	int i;
	for(i = 3; i <= sqrt(x); i += 2){
		if(x % i == 0) return 0;
	}
	return 1;
}

int main(){
	int n, i, count;
	while(cin >> n){
		count = 0;
		for(i = 2; i <= n; i++){
			if(i == 2 || i == 3) count++;
			else if(isprime(i) == 1 && i % 2 != 0) count++;
		}
		cout << count << endl;
	}
	return 0;
}