#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <string>
#include <set>
#include <functional>

class Mod{
		const int n;
		public:
			Mod(const int _n):n(_n){}
			bool operator()(const int _src)const{
				return ! (_src % n);
			}
	};

const std::vector<int> Eratosthenes(const std::vector<int> src){
	std::vector<int> result,tmp(src);
	while(!tmp.empty()){
		int n(tmp[0]);
		result.push_back(n);
		Mod mod(n);
		std::vector<int>::iterator it= std::remove_if( tmp.begin(), tmp.end(), mod );
		tmp.erase(it,tmp.end());
	}
	return result;
}

int main(int,char**){
	int n;
	while(std::cin >>n){
		std::vector<int> vec;
		vec.reserve(n);
		for(int i(2);i<=n;++i)
			vec.push_back(i);
		std::vector<int> primes= Eratosthenes(vec);
		std::cout << primes.size() <<std::endl;
	}
	return 0;
}