#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t n;
  cin >> n;
  int64_t a[n + 1], k = 0;
  fill(a, a + n + 1, 0);
  for (int64_t i = 2; i <= n; i++) {
    if (a[i] == 0) {
      for (int64_t j = i; j <= n; j += i) a[j]++;
    }
    if (a[i] == 2) k++;
  }
  cout << k;
}
