primes = [2]

def is_prime(num):
    root = num ** 0.5
    for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return 0
    return 1

def create_primes(primes, max):
    for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i]

count = 0
n = int(input())
s = [int(input()) for _ in range(n)]

create_primes(primes, int(max(s) ** 0.5))

print(sum(is_prime(i) for i in s)) primes = [2] primes [2] 2 def is_prime(num):
    root = num ** 0.5
    for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return 0
    return 1 is_prime root = num ** 0.5 root num ** 0.5 num 0.5 for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return 0
     prime primes if root < prime:
            break
         root < prime root prime break if num % prime == 0:
            return 0
     num % prime == 0 num % prime num prime 0 return 0 0 return 1 1 num num def create_primes(primes, max):
    for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i] create_primes for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i] i range(primes[-1] + 1,max) range primes[-1] + 1 primes[-1] primes -1 1 max if is_prime(i):
            primes += [i] is_prime(i) is_prime i primes += [i] primes [i] i primes primes max max count = 0 count 0 n = int(input()) n int(input()) int input() input int(input()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) int(input()) int input() input s = [int(input()) for _ in range(n)] s [int(input()) for _ in range(n)] create_primes(primes, int(max(s) ** 0.5)) create_primes primes int(max(s) ** 0.5) int max(s) ** 0.5 max(s) max s 0.5 print(sum(is_prime(i) for i in s)) print sum(is_prime(i) for i in s) sum is_prime(i) is_prime i def is_prime(num):
    root = num ** 0.5
    for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return 0
    return 1 def is_prime(num):
    root = num ** 0.5
    for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return 0
    return 1 is_prime def create_primes(primes, max):
    for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i] def create_primes(primes, max):
    for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i] create_primes count = 0 0 count primes = [2] [2] primes n = int(input()) int(input()) n s = [int(input()) for _ in range(n)] [int(input()) for _ in range(n)] s
primes = [2]

def is_prime(num):
    root = num ** 0.5
    for prime in primes:
        if root < prime:
            break
        if num % prime == 0:
            return 0
    return 1

def create_primes(primes, max):
    for i in range(primes[-1] + 1,max):
        if is_prime(i):
            primes += [i]

count = 0
n = int(input())
s = [int(input()) for _ in range(n)]

create_primes(primes, int(max(s) ** 0.5))

print(sum(is_prime(i) for i in s))