#include <bits/stdc++.h>
using namespace std;
double pi = 2 * acos(0.0);
long long a, b, c, d, e, f, g, h;
const long long N = 1000005;
long long A[N];
void kick2309() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int32_t main() {
  kick2309();
  {
    for (long long i = 1; i < N; i++) A[i] = i;
    A[0] = A[1] = 0;
    for (long long i = 2; i * i < N; i++) {
      if (A[i]) {
        for (long long j = i * i; j < N; j += i) {
          A[j] = 0;
        }
      }
    }
    cin >> a;
    long long res[a + 1];
    for (long long i = 0; i <= a; i++) res[i] = 0;
    long long cnt = 0;
    for (long long i = 1; i <= a; i++) {
      for (long long j = 1; j <= i; j++) {
        if (A[j])
          if (i % A[j] == 0) res[i]++;
      }
      if (res[i] == 2) cnt++;
    }
    cout << cnt;
  }
  return 0;
}
