#include<stdio.h>
#include<math.h>
#define N 10000


int main(){
  int i=0,A[N],count=0,count2=0,n,k,r;
  
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&A[i]);
  for(i=0;i<n;i++){  
     
    while(1){    
      if(A[i]<=1]) break;      
    if(A[i]==2) {count++; break;}
      else if(A[i]<2 || A[i]%2==0) break;
      else{
	while(k<A[i]){	
	  k++;
	  r=A[i]%k;
	  if(r=0){
	    count++;
	    break;}}
	  break;}
    return 0;  }
}