#include<iostream>
using namespace std;
int main(){
	int N,count=0;
	while(cin >> N){
	for(int x=2;x<=N;x++){
		int flag = 0;
		for(int y=2;y<x;y++){
			if((x%y)==0)	flag = 1;
		}
		if(flag == 0)	count++;
	}
	cout << count << endl;
}
	return 0;
}