#include <bits/stdc++.h>
int a[3001 + 3], prime[3001], d = 0;
void siv() {
  int i, j;
  a[0] = a[1] = 1;
  for (i = 3; i * i <= 3001; i += 2) {
    if (a[i] == 0) {
      for (j = i * i; j <= 3001; j += 2 * i) a[j] = 1;
    }
  }
  prime[d++] = 2;
  for (i = 3; i <= 3001; i += 2) {
    if (a[i] == 0) prime[d++] = i;
  }
}
int main() {
  siv();
  int n, i, j, c, fc = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    c = 0;
    for (j = 0; prime[j] <= i; j++) {
      if (i % prime[j] == 0) c++;
    }
    if (c == 2) fc++;
  }
  printf("%d\n", fc);
  return 0;
}
