#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool b[30001];
  int pfac[30001];
  int total = 0;
  for (int i = 2; i <= n; i++) {
    if (!b[i])
      for (int j = i + i; j <= n; j += i) {
        b[j] = 1;
        pfac[j] += 1;
      }
    if (pfac[i] == 2) total++;
  }
  cout << total << endl;
}
