#include <bits/stdc++.h>
int main(void) {
  int i, j, k, N, yakusuu;
  int cnt = 0;
  scanf("%d", &N);
  int a[N];
  for (i = 1; i <= N; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 1; i <= N; i += 2) {
    k = 0;
    for (j = 3; j <= sqrt(i); j += 2) {
      if (a[i] % j == 0) {
        k = 1;
        break;
      }
    }
    if (k == 0) {
      cnt++;
    }
  }
  printf("%d\n", cnt + 1);
  return 0;
}
