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