#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int main(){
  int k, n;
  vector<int> prime;
  vector<int>::iterator i, j;

  cin >> n;

  for(k=2; k<=n; ++k)
    prime.push_back(k);

  i = prime.begin();
  while(i != prime.end()){
    j = i + 1;
    while(j != prime.end()){
      if((*j)%(*i) == 0)
        j = prime.erase(j);
      else
        ++j;
    }
    ++i;
  }

  cout << prime.size() << endl;
  return 0;
}