#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;
  for (int i = 1; i <= x; i++) {
    int counter = 0;
    for (int j = 1; j <= i / 2; j++) {
      if (i % j == 0) counter++;
    }
    if (counter == 1) count++;
  }
  cout << count << endl;
  return 0;
}
