#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int tt, c = 0;
  cin >> tt;
  while (tt) {
    int n = tt;
    set<int> data;
    while (n % 2 == 0) {
      data.insert(2);
      n = n / 2;
    }
    for (int i = 3; i <= sqrt(n); i = i + 2) {
      while (n % i == 0) {
        data.insert(i);
        n = n / i;
      }
    }
    if (n > 2) data.insert(n);
    if (data.size() == 2) {
      c++;
    }
    tt--;
  }
  cout << c << endl;
  cerr << "Time : " << (float)clock() / CLOCKS_PER_SEC << " s" << endl;
  return 0;
}
