#include <bits/stdc++.h>
int prime[3001];
void Seive(int prime[]) {
  int i, j, sroot;
  for (i = 0; i <= 3000; i++) prime[i] = 0;
  sroot = sqrt(3000);
  prime[0] = prime[1] = 1;
  for (i = 4; i <= 3000; i += 2) prime[i] = 1;
  for (i = 3; i <= sroot; i += 2) {
    if (prime[i] == 0) {
      for (j = i * i; j <= 3000; j += i * 2) {
        prime[j] = 1;
      }
    }
  }
  return;
}
int main() {
  Seive(prime);
  int input, i, j, count, root, store;
  int ara[3001] = {0};
  for (i = 6; i <= 3000; i++) {
    count = 0;
    if (prime[i] == 1) {
      root = sqrt(i);
      for (j = 2; j <= root; j++) {
        if (i % j == 0) {
          if (prime[j] == 0) count++;
          if (j != i / j && prime[i / j] == 0) count++;
          if (count >= 3) break;
        }
      }
      if (count == 2) ara[i] = 1;
    }
  }
  while (scanf("%d", &input) == 1) {
    store = 0;
    for (i = 1; i <= input; i++) {
      if (ara[i] == 1) {
        ++store;
      }
    }
    printf("%d\n", store);
  }
  return 0;
}
