#include <bits/stdc++.h>
using namespace std;
int n, nrd, k, i, j, prim[1500], prime;
int main() {
  cin >> n;
  i = 0;
  for (int nr = 2; nr <= n; nr++) {
    nrd = 0;
    for (int d = 2; d <= nr / 2; d++) {
      if (nr % d == 0) nrd++;
    }
    if (nrd == 0) {
      i++;
      prim[i] = nr;
    }
  }
  prime = i;
  for (int nr = 1; nr <= n; nr++) {
    nrd = 0;
    for (int j = 1; j <= prime; j++)
      if (nr % prim[j] == 0) nrd++;
    if (nrd == 2) k++;
  }
  cout << k << "\n";
  return 0;
}
