
#include<iostream>
#include<math.h>
#include<vector>
using namespace std;


int main(void){
  int n;
  vector<int> v(10000) = 0;
  int flg=0;
  int count=0;
  cin >> n;
for(int k = 0;k<n;k++)
 {
      cin >> v[k];
  for(int i = 2;i<=v[k];i++){
    for(int j= 2;j<=sqrt(v[k])+1;j++){
	  if(i%j==0&&i!=j)
	    {
	      flg=1;
	    }
	}
      if(flg==0)
	{
	  count=count+1;
	}
      flg=0;
  }
 }
  cout << count << endl;
  return 0;
}


