import math
n = int(input())
cnt = 0
for i in range(n):
    x = int(input())
    if x == 2:
        cnt += 1
    elif x <= 1\
    or x % 2 == 0:
        continue
    else:
        j = 3
        prime = "yes"
        while j <= math.sqrt(x):
            if x % j == 0:
                prime = "no"
                break
            else:
                j += 2
        if prime == "yes":
            cnt += 1
print(cnt) import math math n = int(input()) n int(input()) int input() input cnt = 0 cnt 0 for i in range(n):
    x = int(input())
    if x == 2:
        cnt += 1
    elif x <= 1\
    or x % 2 == 0:
        continue
    else:
        j = 3
        prime = "yes"
        while j <= math.sqrt(x):
            if x % j == 0:
                prime = "no"
                break
            else:
                j += 2
        if prime == "yes":
            cnt += 1 i range(n) range n x = int(input()) x int(input()) int input() input if x == 2:
        cnt += 1
    elif x <= 1\
    or x % 2 == 0:
        continue
    else:
        j = 3
        prime = "yes"
        while j <= math.sqrt(x):
            if x % j == 0:
                prime = "no"
                break
            else:
                j += 2
        if prime == "yes":
            cnt += 1 x == 2 x 2 cnt += 1 cnt 1 elif x <= 1\
    or x % 2 == 0:
        continue
     x <= 1\
    or x % 2 == 0 x <= 1 x 1 x % 2 == 0 x % 2 x 2 0 continue j = 3 j 3 prime = "yes" prime "yes" while j <= math.sqrt(x):
            if x % j == 0:
                prime = "no"
                break
            else:
                j += 2
         j <= math.sqrt(x) j math.sqrt(x) math.sqrt math sqrt x if x % j == 0:
                prime = "no"
                break
            else:
                j += 2
         x % j == 0 x % j x j 0 prime = "no" prime "no" break j += 2 j 2 if prime == "yes":
            cnt += 1 prime == "yes" prime "yes" cnt += 1 cnt 1 print(cnt) print cnt x = int(input()) int(input()) x prime = "yes" "yes" prime prime = "no" "no" prime cnt += 1 1 cnt j += 2 2 j j = 3 3 j cnt += 1 1 cnt cnt = 0 0 cnt n = int(input()) int(input()) n
import math
n = int(input())
cnt = 0
for i in range(n):
    x = int(input())
    if x == 2:
        cnt += 1
    elif x <= 1\
    or x % 2 == 0:
        continue
    else:
        j = 3
        prime = "yes"
        while j <= math.sqrt(x):
            if x % j == 0:
                prime = "no"
                break
            else:
                j += 2
        if prime == "yes":
            cnt += 1
print(cnt)