#include <bits/stdc++.h>
using namespace std;
long long pw(long long a, long long b, long long md) {
  return (!b ? 1
             : (b & 1 ? a * pw(a * a % md, b / 2, md) % md
                      : pw(a * a % md, b / 2, md) % md));
}
const long long MOD = 1e9 + 7, MAXN = 1e6 + 10;
bool prime[MAXN];
long long n, ans, p;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (long long i = 0; i < MAXN; i++) prime[i] = true;
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * 2; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long i = 1; i <= n; i++) {
    p = 0;
    for (long long j = 2; j <= i; j++) {
      if (i % j == 0 && prime[j]) p++;
    }
    if (p == 2) ans++;
  }
  cout << ans;
  return 0;
}
