#define _USE_MATH_DEFINES
#include <iostream> 
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int N;
	while (cin >> N){
		int sum =0;
		for(int i=2; i<=N; i++){
			int flag = 1;
			for(int q = 2;q <= sqrt(i);++q){
				if(i % q == 0){
					flag = 0;
				}
			}
			sum += flag;
		}
		cout << sum << endl;
	}
	return 0;
}
