#include <iostream>
#include <cmath>
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;
    }
    x++;
    for (int i = 3; i <= n; i += 2)
      for (int j = 2; j * j <= i; j++) {
        if (i % j == 0) break;
        if (j + 1 > sqrt(i)) x++;
      }
    cout << x << endl;
  }
}