#include <bits/stdc++.h>
using namespace std;
int main() {
  bool num[10002] = {false};
  int give[260];
  int maxs = 0, n, co = 0;
  for (int i = 0; (scanf("%d", &give[i]) != EOF); ++i) {
    if (maxs < give[i]) maxs = give[i];
    n = i;
  }
  num[1] = true;
  for (int i = 2; i <= sqrt(maxs); i++) {
    if (!num[i]) {
      for (int j = 2; j * i <= maxs; j++) {
        num[j * i] = true;
      }
    }
  }
  for (int i = 0; i <= n; i++) {
    if (!num[give[i]]) co++;
  }
  cout << co << endl;
}
