#include<iostream>
#include<vector>

using namespace std;

int main(){
  int i, j, n, isFound;
  vector<int> prime;

  while(cin >> n){
    for(i=2; i<=n; ++i){
      isFound = 1;
      for(j=0; j < prime.size(); ++j){
	if(i % prime[j] == 0){
	  isFound = 0;
	  break;
	}
      }
      if(isFound == 1)
	prime.push_back(i);
    }
    cout << prime.size() << endl;
    prime.clear();
  }

  return 0;
}