#include<iostream>
#include<math.h>
using namespace std;

int main(){
	int yaku = 0,n,hoge = 0;
	while(cin >> n){
		hoge = 0;
		if(n > 2){
			for(int i = 3;i <= n;i += 2){
				yaku = 0;
				for(int j = 3;j <= sqrt((double)i);j = j + 2){
					
					if(i % j == 0){
						yaku++;
						break;
					}
				}
				if ( yaku == 0)	hoge++;
			}
			
			hoge++;
		}else	hoge == 1;
		cout <<  hoge << endl;

	}

}