#include <iostream>
#include <set>
using namespace std;
int main() {
  long n;
  set<long> primes;
  primes.insert(2);
  while (cin >> n) {
    for (int i = 3; i <= n; i++) {
      bool prime = true;
      for (long j : primes)
        if (i % j == 0) {
          prime = false;
          break;
        }
      if (prime) primes.insert(i);
    }
    int x = 0;
    for (long j : primes)
      if (j <= n) x++;
    cout << x << endl;
  }
}