import sys

count = 0

inarr = set()

for line in sys.stdin:
    n = int(line)

    if n == 2:
        inarr.add(n)
        continue

    jdg = True
    for i in range(2, n):
        if n % i == 0:
            jdg = False
            break
    if jdg:
        inarr.add(n)

print(len(inarr))

