#include <bits/stdc++.h>
using namespace std;
int main() {
  int sieve[3001] = {0};
  sieve[0] = 1;
  sieve[1] = 1;
  int i, j;
  for (i = 2; i < 3001; i++) {
    if (sieve[i] == 0) {
      for (j = i * i; j < 3001; j += i) sieve[j] = 1;
    }
  }
  int n, c = 0;
  cin >> n;
  vector<int> v;
  for (i = 2; i <= n; i++) {
    c = 0;
    for (j = 3; j <= (i / 2); j += 2) {
      if (sieve[j] == 0 && i % j == 0) c++;
    }
    if (i % 2 == 0) c++;
    if (c == 2) {
      v.push_back(i);
      c = 0;
    }
  }
  int l = v.size();
  cout << l << endl;
}
