#include <iostream>
#include <vector>
using namespace std;


int main() {

//変数の宣言

	vector<int> prime;
	int i,n,j;
	
	cin >> n;
	prime.push_back(2);
	
	for(i=3;i<n+1;i++){
		for(j=0;j<prime.size();j++){
			if (i%prime[j]==0) break;
			if (j==prime.size()-1) {
				prime.push_back(i);
			}
		}
	}
	
	/*
	for(i=0;i<prime.size();i++){
		cout << prime[i] <<endl;
	}
	*/
	cout << prime.size() <<endl;
	

	return 0;
}