#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0, c;
  cin >> n;
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true)
      for (int i = p * p; i <= n; i += p) prime[i] = false;
  }
  for (int i = 6; i <= n; i++) {
    c = 0;
    for (int j = 2; j <= i; j++) {
      if (i % j == 0 && prime[j] == true) c++;
    }
    if (c == 2) count++;
  }
  cout << count;
}
