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