#encoding=utf-8
 
import sys
num = []
ans = []
def prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1


for i in sys.stdin:
    inp = map(int , i.split())
    if prime(inp[0]):
        num.append(inp)
num.sort()

for i in xrange(1, len(num)):
    if num[i - 1] != num[i]:
        ans.append(num[i][0])
print len(ans) + 1 import sys sys num = [] num [] ans = [] ans [] def prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1 prime q = abs(q) q abs(q) abs q if q == 2: return True
     q == 2 q 2 if q < 2 or q&1 == 0: return False
     q < 2 or q&1 == 0 q < 2 q 2 q&1 == 0 q&1 q 1 0 return pow(2, q-1, q) == 1 pow(2, q-1, q) == 1 pow(2, q-1, q) pow 2 q-1 q 1 q 1 q q for i in sys.stdin:
    inp = map(int , i.split())
    if prime(inp[0]):
        num.append(inp) i sys.stdin sys stdin inp = map(int , i.split()) inp map(int , i.split()) map int i.split() i.split i split if prime(inp[0]):
        num.append(inp) prime(inp[0]) prime inp[0] inp 0 num.append(inp) num.append num append inp num.sort() num.sort num sort for i in xrange(1, len(num)):
    if num[i - 1] != num[i]:
        ans.append(num[i][0]) i xrange(1, len(num)) xrange 1 len(num) len num if num[i - 1] != num[i]:
        ans.append(num[i][0]) num[i - 1] != num[i] num[i - 1] num i - 1 i 1 num[i] num i ans.append(num[i][0]) ans.append ans append num[i][0] [i] num i 0 print len(ans) + 1 len(ans) len ans 1 def prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1 def prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1 prime num = [] [] num ans = [] [] ans inp = map(int , i.split()) map(int , i.split()) inp
#encoding=utf-8
 
import sys
num = []
ans = []
def prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1


for i in sys.stdin:
    inp = map(int , i.split())
    if prime(inp[0]):
        num.append(inp)
num.sort()

for i in xrange(1, len(num)):
    if num[i - 1] != num[i]:
        ans.append(num[i][0])
print len(ans) + 1