#include <bits/stdc++.h>
int main(void) {
  int prime[10000], n, i, j = 1, count = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &prime[i]);
  }
  for (i = 0; i < n; i++) {
    for (j = 1; j < n / 2; j++)
      if (prime[i] % (2 * j) == 0) {
        count++;
        break;
      } else if (2 * j + 1 == prime[i])
        break;
      else if (prime[i] % (2 * j + 1) == 0) {
        count++;
        break;
      }
  }
  printf("%d\n", n - count);
}
