#include <bits/stdc++.h>
int Prime[100000000];
void Sieve() {
  int j, k;
  for (k = 2; k < 100000000; k++) {
    Prime[k] = k;
  }
  Prime[1] = 0;
  for (k = 2; k * k <= 100000000; k++)
    if (Prime[k] > 0)
      for (j = 2 * k; j <= 10000; j += k) Prime[j] = 0;
}
int isPrime(int n) { return Prime[n]; }
int main(void) {
  Sieve();
  int n, i;
  scanf("%6d", &n);
  for (i = 0; i < n; i++) {
    int p, count = 0;
    scanf("%8d", &p);
    if (isPrime(p)) count++;
  }
  return 0;
}
