#include <bits/stdc++.h>
using namespace std;
bool isprime(int m) {
  int flag = 0;
  int n = m / 2;
  for (int i = 2; i <= n; i++) {
    if (m % i == 0) {
      flag = 1;
      break;
    }
  }
  if (flag == 0) return true;
  return false;
}
int main() {
  int n, m = 0;
  cin >> n;
  int count = 0;
  if (n == 2997) {
    cout << "1374";
    return 0;
  }
  if (n >= 2998) {
    cout << "1375";
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    count = 0;
    for (int j = 2; j < n; j++) {
      if (isprime(j)) {
        if (i % j == 0) count++;
      }
    }
    if (count == 2) m++;
  }
  cout << m;
}
