#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, max = 0;
  cin >> n;
  int x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x > max) {
      max = x;
    }
  }
  int count = 0;
  double nn = max;
  nn = sqrt(nn);
  for (int i = 3; i <= max; i++) {
    if (i % 2 == 0) continue;
    int counter = 0;
    for (int j = 1; j <= sqrt(i); j++) {
      if (i % j == 0) counter++;
      if (counter >= 2) continue;
    }
    if (counter == 1) count++;
  }
  cout << count + 1 << endl;
  return 0;
}
