#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, max, b;
  int count = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> b;
    max = (int)sqrt((double)b);
    if (b == 2) count++;
    for (int j = 2; j <= max; j++) {
      if (b % j == 0) {
        break;
      } else {
        count++;
      }
    }
  }
  cout << count << "\n";
  return 0;
}
