#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int arr[n + 1];
  for (int i = 0; i <= n; i++) arr[i] = 0;
  int result = 0;
  for (int i = 2; i <= n; i++) {
    if (arr[i] == 2) {
      result++;
      continue;
    }
    if (arr[i] != 0) continue;
    for (int j = i; j <= n; j += i) {
      arr[j]++;
    }
  }
  printf("%d", result);
  return 0;
}
