#include <bits/stdc++.h>
int main() {
  int i, j, k, count, p, n, m;
  scanf("%d", &n);
  for (i = 5, m = 0; i <= n; i++) {
    for (j = 2, count = 0; j <= i / 2; j++) {
      if (i % j == 0) {
        for (k = 2, p = 1; k <= j / 2; k++) {
          if (j % k == 0) {
            p = 0;
            break;
          }
        }
        if (p == 1) count++;
      }
    }
    if (count == 2) m++;
  }
  printf("%d\n", m);
  return 0;
}
