#include <bits/stdc++.h>
using namespace std;
bool primes[3001];
void sieve() {
  memset(primes, true, sizeof(primes));
  primes[1] = primes[0] = false;
  for (long long i = 2; i <= 3000; i++) {
    if (primes[i]) {
      for (long long j = i * i; j <= 3000; j += i) primes[j] = false;
    }
  }
}
void solve() {
  sieve();
  long long n;
  cin >> n;
  long long ans = 0;
  for (long long i = 1; i <= n; i++) {
    long long cnt = 0;
    for (long long j = 2; j * j <= i; j++) {
      if (i % j == 0) {
        if (j == i / j) {
          if (primes[j]) cnt++;
        } else {
          if (primes[j]) cnt++;
          if (primes[i / j]) cnt++;
        }
      }
    }
    if (cnt == 2) ans++;
  }
  cout << ans;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
