#include <iostream>
#include <list>
#include <algorithm>

int main(){
	int NUM;
	std::list<int> numList,primeList;
	std::cin >> NUM;
	if(NUM<2){
		return 0;
	}
	for(int i=2;i<=NUM;++i){
		numList.push_back(i);
	}
	
	for(int i=numList.front();i<std::sqrt(NUM);i=numList.front()){
		primeList.push_back(i);
		numList.erase(std::remove_if(numList.begin(),numList.end(),[&](int num){return num%i==0;}),numList.end());
	}
	std::copy(numList.begin(),numList.end(),std::back_inserter(primeList));

	std::cout << primeList.size() << std::endl;

	return 0;
}