#include <bits/stdc++.h>
using namespace std;
int main() {
  long n;
  cin >> n;
  bool arr[3000];
  memset(arr, true, 3000);
  arr[0] = false;
  arr[1] = false;
  for (int i = 2; i < 3000; i++) {
    if (arr[i] == true) {
      for (int j = i * i; j < 3000; j += i) arr[j] = false;
    }
  }
  long ans = 0;
  for (int i = 6; i <= n; i++) {
    long s = i;
    long count = 0;
    for (int j = 2; j * j <= i; j++) {
      if (arr[j] == true && s % j == 0) {
        count++;
        while (s % j == 0) s = s / j;
        if (arr[s] == true) {
          count++;
          break;
        }
        if (s == 1) break;
      }
    }
    if (count == 2) ans++;
  }
  cout << ans;
}
