#include <bits/stdc++.h>
int main() {
  const int data_num = 100;
  int data[data_num] = {5, 6, 8};
  int n = 10000;
  int flag[n + 1];
  int ans = 0;
  int i, j;
  for (i = 1; i < n + 1; i++) flag[i] = 1;
  flag[1] = 0;
  for (i = 1; i < sqrt(n + 1); i++) {
    if (flag[i] == 1)
      for (j = 2; i * j < n + 1; j++) flag[i * j] = 0;
  }
  for (i = 0; i < data_num; i++)
    if (flag[data[i]] == 1) ans++;
  printf("%d\n", ans);
  return 0;
}
