#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, cnt = 0;
  cin >> n;
  for (i = 1; i <= n; i++) {
    int temp = i;
    set<int> pf;
    vector<int> v;
    while (i % 2 == 0) {
      v.push_back(2);
      i = i / 2;
    }
    for (int z = 3; z <= sqrt(i); z = z + 2) {
      while (i % z == 0) {
        v.push_back(z);
        i = i / z;
      }
    }
    if (i > 2) v.push_back(i);
    for (i = 0; i < v.size(); i++) pf.insert(v[i]);
    if (pf.size() == 2) cnt++;
    i = temp;
  }
  cout << cnt << endl;
  return 0;
}
