import math
import cmath
def check(inp):
    if inp==2:
        return True
    for num in xrange(2,int(math.sqrt(inp)+1)):
        if inp%num==0:
            return False
    return True
st=set()


while True:
    try:
       str=raw_input().strip()

    except EOFError:
        break
    #print str
    num=int(str)
    st.add(num)
sum=0
for nm in st:
    if check(nm):
        sum+=1
print sum import math math import cmath cmath def check(inp):
    if inp==2:
        return True
    for num in xrange(2,int(math.sqrt(inp)+1)):
        if inp%num==0:
            return False
    return True check if inp==2:
        return True
     inp==2 inp 2 return True True for num in xrange(2,int(math.sqrt(inp)+1)):
        if inp%num==0:
            return False
     num xrange(2,int(math.sqrt(inp)+1)) xrange 2 int(math.sqrt(inp)+1) int math.sqrt(inp)+1 math.sqrt(inp) math.sqrt math sqrt inp 1 if inp%num==0:
            return False
     inp%num==0 inp%num inp num 0 return False False return True True inp inp st=set() st set() set while True:
    try:
       str=raw_input().strip()

    except EOFError:
        break
    #print str
    num=int(str)
    st.add(num) True try:
       str=raw_input().strip()

    except EOFError:
        break
    #print str
     except EOFError:
        break
    #print str
     break str=raw_input().strip() str raw_input().strip() ().strip () raw_input strip num=int(str) num int(str) int str st.add(num) st.add st add num sum=0 sum 0 for nm in st:
    if check(nm):
        sum+=1 nm st if check(nm):
        sum+=1 check(nm) check nm sum+=1 sum 1 print str=raw_input().strip() raw_input().strip() str sum=0 0 sum def check(inp):
    if inp==2:
        return True
    for num in xrange(2,int(math.sqrt(inp)+1)):
        if inp%num==0:
            return False
    return True def check(inp):
    if inp==2:
        return True
    for num in xrange(2,int(math.sqrt(inp)+1)):
        if inp%num==0:
            return False
    return True check sum+=1 1 sum num=int(str) int(str) num st=set() set() st
import math
import cmath
def check(inp):
    if inp==2:
        return True
    for num in xrange(2,int(math.sqrt(inp)+1)):
        if inp%num==0:
            return False
    return True
st=set()


while True:
    try:
       str=raw_input().strip()

    except EOFError:
        break
    #print str
    num=int(str)
    st.add(num)
sum=0
for nm in st:
    if check(nm):
        sum+=1
print sum
