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