#include <bits/stdc++.h>
int main() {
  int a = 0, i, j = 3, n;
  int num[10000];
  double snum = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &num[i]);
    if (num[i] == 1) {
      printf("2~10^8までの数を入力してください");
      break;
    }
  }
  for (i = 0; i < n; i++) {
    if (num[i] == 2) {
      a++;
    } else if (num[i] % 2 == 0) {
      a += 0;
    } else if (num[i] % 2 == 1) {
      snum = sqrt(100000000);
      for (j = 3; j <= snum; j += 2) {
        if (num[i] % j == 0) {
          a++;
        }
      }
    }
  }
  printf("%d\n", a);
  return 0;
}
