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