#include<stdio.h>
int main()
{
    int x, box[10000], i, n, k, ans = 0, m = 0;
   
    scanf("%d", &n);
    for (k = 0; k < n; k++)
        scanf("%d", &box[k]);

    for (x = 0; x < n; x++) {
        if (box[x] == 2)
            ans???= ans + 1;

        if (box[x] % 2 == 1){
            for (i = 3; i <= 100); i += 2)
            {
                if (box[x] % i == 0)
                    m = 1; 
                
                if (m == 0)  
                    ans = ans + 1;
            }
                
            }
    }
    printf("%d\n", ans);
    return 0;
}