from math import sqrt
def isprime(inlst, chk, sq):
	for i in range(3, sq, 2):
		inlst = [x for x in inlst if x%i > 0 or x == i]
		i += 2
	return inlst
n = int(input())
inlst = [input() for i in range(n)]
inlst = [int(i) for i in inlst]
inlst = [x for x in inlst if x%2 > 0 or x == 2]
inlst = isprime(inlst, 3, int(sqrt(max(inlst))) + 1)
print(len(inlst)) from math import sqrt def isprime(inlst, chk, sq):
	for i in range(3, sq, 2):
		inlst = [x for x in inlst if x%i > 0 or x == i]
		i += 2
	return inlst isprime for i in range(3, sq, 2):
		inlst = [x for x in inlst if x%i > 0 or x == i]
		i += 2
	 i range(3, sq, 2) range 3 sq 2 x for x in inlst if x%i > 0 or x == i for x in inlst if x%i > 0 or x == i x inlst x%i > 0 or x == i x%i > 0 x%i x i 0 x == i x i if x%i > 0 or x == i x inlst = [x for x in inlst if x%i > 0 or x == i] inlst [x for x in inlst if x%i > 0 or x == i] i += 2 i 2 return inlst inlst inlst inlst chk chk sq sq n = int(input()) n int(input()) int input() input input() for i in range(n) for i in range(n) i range(n) range n for i in range(n) input() input inlst = [input() for i in range(n)] inlst [input() for i in range(n)] int(i) for i in inlst for i in inlst i inlst for i in inlst int(i) int i inlst = [int(i) for i in inlst] inlst [int(i) for i in inlst] x for x in inlst if x%2 > 0 or x == 2 for x in inlst if x%2 > 0 or x == 2 x inlst x%2 > 0 or x == 2 x%2 > 0 x%2 x 2 0 x == 2 x 2 if x%2 > 0 or x == 2 x inlst = [x for x in inlst if x%2 > 0 or x == 2] inlst [x for x in inlst if x%2 > 0 or x == 2] inlst = isprime(inlst, 3, int(sqrt(max(inlst))) + 1) inlst isprime(inlst, 3, int(sqrt(max(inlst))) + 1) isprime inlst 3 int(sqrt(max(inlst))) + 1 int(sqrt(max(inlst))) int sqrt(max(inlst)) sqrt max(inlst) max inlst 1 print(len(inlst)) print len(inlst) len inlst inlst = [input() for i in range(n)] [input() for i in range(n)] inlst n = int(input()) int(input()) n inlst = [int(i) for i in inlst] [int(i) for i in inlst] inlst inlst = isprime(inlst, 3, int(sqrt(max(inlst))) + 1) isprime(inlst, 3, int(sqrt(max(inlst))) + 1) inlst def isprime(inlst, chk, sq):
	for i in range(3, sq, 2):
		inlst = [x for x in inlst if x%i > 0 or x == i]
		i += 2
	return inlst def isprime(inlst, chk, sq):
	for i in range(3, sq, 2):
		inlst = [x for x in inlst if x%i > 0 or x == i]
		i += 2
	return inlst isprime inlst = [x for x in inlst if x%2 > 0 or x == 2] [x for x in inlst if x%2 > 0 or x == 2] inlst
from math import sqrt
def isprime(inlst, chk, sq):
	for i in range(3, sq, 2):
		inlst = [x for x in inlst if x%i > 0 or x == i]
		i += 2
	return inlst
n = int(input())
inlst = [input() for i in range(n)]
inlst = [int(i) for i in inlst]
inlst = [x for x in inlst if x%2 > 0 or x == 2]
inlst = isprime(inlst, 3, int(sqrt(max(inlst))) + 1)
print(len(inlst))