#include <cstdio>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <string> 
#include <vector> 
using namespace std;

int main(){
	int max,n[1000],c = 0,check,a;
	cin >> max;
	for(int i = 2;max >= i;i++){
		check = 0;
		for(int iii = 1;c >= iii;iii++){
			if(i % n[iii] == 0){check = 1;break;}
		}
		for(int ii = 2;i > ii and check == 0;ii++){
			if(i % ii == 0){check = 1;break;}
		}
		if(check == 0){c++;n[c] = i;}

	}
	cout << c << endl;



}