#include <bits/stdc++.h>
using namespace std;
int prime(int n) {
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  int s = sqrt(n);
  for (int i = 3; i <= s; i += 2) {
    if (n % i == 0) return 0;
  }
  return 1;
}
int main() {
  int n, count = 0, fact;
  cin >> n;
  if (n < 6)
    cout << '0';
  else {
    for (int i = 6; i <= n; i++) {
      fact = 0;
      int m = i / 2;
      for (int j = 2; j <= m; j++) {
        if ((i % j == 0) && prime(j)) {
          fact++;
        }
        if (fact > 2) break;
      }
      if (fact == 2) count++;
    }
    cout << count;
  }
  return 0;
}
