#include <iostream>
#include <math.h>

int main(){

	int i,j,k,n,x;

	while(std::cin >> n){
		x = 1;
		for(i=3;i<=n;i+=2){
			k = 0;
			for(j=3;j<i;j+=2){
				if(i%j == 0){
					k = 1;
					break;
				}
			}
			if(k == 0){
				x++;
			}			
		}
		std::cout << x << std::endl;
	}
}