import math
count = 0

for i =in range(10000):
    n = int(input())
    if i == 2:
        count += 1
    else:
        for j in range(3, 100000000, 2):
            k = math.sqrt(n)
            if j > k:
                break
            if n % j == 0:
                count += 1
                break
    print(count)
