#include <bits/stdc++.h>
using namespace std;
void precompute(int n, vector<int>& ip) {
  vector<int> primes;
  for (int i = 2; i <= n; i++) {
    if (ip[i] == 0) {
      primes.push_back(i);
      ip[i] = i;
    }
    for (int j = 0;
         j < primes.size() && primes[j] <= ip[i] && primes[j] * i <= n; j++) {
      ip[i * primes[j]] = primes[j];
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> is_prime(n + 1, 0);
  precompute(n, is_prime);
  int c = 0;
  if (n < 6) {
    cout << 0;
    return 0;
  }
  for (int i = 6; i <= n; i++) {
    if (is_prime[i] != i) {
      int k = i / is_prime[i];
      int t1 = is_prime[i];
      int t2 = 0;
      bool flag = true;
      if (k != 1)
        t2 = is_prime[k];
      else {
        continue;
      }
      k /= is_prime[k];
      if (t1 == t2 && k == 1) {
        flag = false;
        continue;
      }
      while (k != 1) {
        if (t2 == t1) {
          t2 = is_prime[k];
          k /= is_prime[k];
          if (k == 1 && t1 == t2) {
            flag = false;
            break;
          }
        } else if (is_prime[k] != t1 && is_prime[k] != t2) {
          flag = false;
          break;
        } else {
          k /= is_prime[k];
        }
      }
      if (flag) {
        c++;
      }
    }
  }
  cout << c;
}
