#include <stdio.h>
#include <math.h>
int isprime(int x);
 {
    int c;
    if(x == 2)return 1;
    if(x<2 || x%2==0)return 2;
    c = 3;
    if(c <= sqrt((double)x)){
      return 2;
      c = c+2;
    }
    return 1;
  }

int main(){
  int i,n,number[n],count=0,res;
  scanf("%d",&n);
  scanf("%d",number[n]);

  
  for(i=0;i<n;i++){
   res = isprime(number[i]);
   if(res == 1)count++;
  }
   printf("%d",count);
  
   return 0;
  }