#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#define rep(x,to) for(x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

int num,i,cnt;


	while(cin >> num){
		cnt=1;
		for(i=3;i <= num;i+=2){
			bool swa = true;
			for(int j=3; j*j <= i;j+=2){
				if(i % j == 0){
					swa=false;
					continue;
				}

			}
			if( swa == true ){
				cnt++;
//				cout << i << " ";
			}
		}
		cout << cnt <<endl;
	}
	return 0;
}