import sys
import math

count = 0
judge = 0

for line in sys.stdin.readlines():
    num = int(line.strip())
    if judge == 0:
        judge = 1
    else:    
        flag = 0
        for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                flag = 1
                break
        if flag == 0:
            count += 1

print count import sys sys import math math count = 0 count 0 judge = 0 judge 0 for line in sys.stdin.readlines():
    num = int(line.strip())
    if judge == 0:
        judge = 1
    else:    
        flag = 0
        for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                flag = 1
                break
        if flag == 0:
            count += 1 line sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines num = int(line.strip()) num int(line.strip()) int line.strip() line.strip line strip if judge == 0:
        judge = 1
    else:    
        flag = 0
        for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                flag = 1
                break
        if flag == 0:
            count += 1 judge == 0 judge 0 judge = 1 judge 1 flag = 0 flag 0 for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                flag = 1
                break
         i range(2, int(math.sqrt(num)) + 1) range 2 int(math.sqrt(num)) + 1 int(math.sqrt(num)) int math.sqrt(num) math.sqrt math sqrt num 1 if num % i == 0:
                flag = 1
                break
         num % i == 0 num % i num i 0 flag = 1 flag 1 break if flag == 0:
            count += 1 flag == 0 flag 0 count += 1 count 1 print count = 0 0 count judge = 1 1 judge count += 1 1 count judge = 0 0 judge num = int(line.strip()) int(line.strip()) num flag = 0 0 flag flag = 1 1 flag
import sys
import math

count = 0
judge = 0

for line in sys.stdin.readlines():
    num = int(line.strip())
    if judge == 0:
        judge = 1
    else:    
        flag = 0
        for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                flag = 1
                break
        if flag == 0:
            count += 1

print count