#include <iostream>
#include <cmath>
using namespace std;

int main() {
	
	int n;
	int count;
	int *prime;
	
	
	while( cin >> n ){
		prime = new int[n];
		count = 1;
		
		prime[0] = 2;
		
		for(int i=3;i<=n;i+=2){
			int isPrime = true;
			
			for(int j=0;j<count;++j){
				if(i%prime[j] == 0){
					isPrime = false;
					break;
				}
			}
			
			if(isPrime){
				prime[count] = i;
				count++;
			}
		}
		
		cout << count << endl;
		
		delete[] prime;
	}
	
	return 0;
}