#include <iostream>

using namespace std;

long n,ans;

int main(){
	while(cin >> n){
		ans = 1;
		if(n == 1){
			cout << 0 << endl;
			continue;
		}
		if(n == 2){
			cout << 1 << endl;
			continue;
		}
		for(long i=3;i<=n;i=i+2){
			ans += 1;
			for(long j=3;j*j<=i;j=j+2){
				long k = i/j;
				if(i == k*j){
					ans -= 1;
					break;
				}
			}
		}
		
		cout << ans << endl;
	}
	return 0;
}