#include <bits/stdc++.h>
int main(void) {
  int n, conut;
  scanf("%d\n", &n);
  int k, i, s[10000], count;
  for (i = 0; i < n; i++) scanf("%d\n", &s[i]);
  for (i = 0; i < n; i++) {
    for (k = 2; s[i] % k != 0; k++) {
      if (k != s[i]) count++;
    }
  }
  printf("%d\n", count);
  return 0;
}
