#include <bits/stdc++.h>
using namespace std;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
int main() {
  int cnt = 0, n;
  scanf("%d", &(n));
  int num[n];
  for (int i = 0; i < (int)(n); i++) {
    scanf("%d", &(num[i]));
  }
  for (int i = 0; i < (int)(n); i++) {
    cnt += num[i] == 2;
    cnt += num[i] < 2 || !(num[i] % 2);
    int j = 3;
    while (j <= sqrt(num[i])) {
      cnt += !(num[i] % j);
      j++;
    }
  }
  printf("%d\n", cnt);
}
