#include <bits/stdc++.h>
int main(void) {
  int i;
  int n;
  int counter = 0;
  n = 2;
  n++;
  for (; 2 <= n <= 100000000; n += 2) {
    for (i = 3; i < n; i += 2) {
      if (n % i == 0) break;
    }
    if (n == i) counter++;
  }
  printf("%d\n", counter);
  return (0);
}
