# -*- coding:utf-8 -*-
import math
count = 0
while True:
    try:
        n = int(input())
        if n == 2 or n == 3 or n == 5 or n == 7:
            count += 1
        if n > 3 and n % 2 != 0:
            for i in range(3,int(math.sqrt(n))+1):
                if n % i == 0:
                    break
                elif i == int(math.sqrt(n)):
                    count += 1
    except  EOFError:
        break
print(count) import math math count = 0 count 0 while True:
    try:
        n = int(input())
        if n == 2 or n == 3 or n == 5 or n == 7:
            count += 1
        if n > 3 and n % 2 != 0:
            for i in range(3,int(math.sqrt(n))+1):
                if n % i == 0:
                    break
                elif i == int(math.sqrt(n)):
                    count += 1
    except  EOFError:
        break True try:
        n = int(input())
        if n == 2 or n == 3 or n == 5 or n == 7:
            count += 1
        if n > 3 and n % 2 != 0:
            for i in range(3,int(math.sqrt(n))+1):
                if n % i == 0:
                    break
                elif i == int(math.sqrt(n)):
                    count += 1
    except  EOFError:
        break except  EOFError:
        break break n = int(input()) n int(input()) int input() input if n == 2 or n == 3 or n == 5 or n == 7:
            count += 1
         n == 2 or n == 3 or n == 5 or n == 7 n == 2 or n == 3 or n == 5 n == 2 or n == 3 n == 2 n 2 n == 3 n 3 n == 5 n 5 n == 7 n 7 count += 1 count 1 if n > 3 and n % 2 != 0:
            for i in range(3,int(math.sqrt(n))+1):
                if n % i == 0:
                    break
                elif i == int(math.sqrt(n)):
                    count += 1
     n > 3 and n % 2 != 0 n > 3 n 3 n % 2 != 0 n % 2 n 2 0 for i in range(3,int(math.sqrt(n))+1):
                if n % i == 0:
                    break
                elif i == int(math.sqrt(n)):
                    count += 1
     i range(3,int(math.sqrt(n))+1) range 3 int(math.sqrt(n))+1 int(math.sqrt(n)) int math.sqrt(n) math.sqrt math sqrt n 1 if n % i == 0:
                    break
                elif i == int(math.sqrt(n)):
                    count += 1
     n % i == 0 n % i n i 0 break elif i == int(math.sqrt(n)):
                    count += 1
     i == int(math.sqrt(n)) i int(math.sqrt(n)) int math.sqrt(n) math.sqrt math sqrt n count += 1 count 1 print(count) print count n = int(input()) int(input()) n count = 0 0 count count += 1 1 count count += 1 1 count
# -*- coding:utf-8 -*-
import math
count = 0
while True:
    try:
        n = int(input())
        if n == 2 or n == 3 or n == 5 or n == 7:
            count += 1
        if n > 3 and n % 2 != 0:
            for i in range(3,int(math.sqrt(n))+1):
                if n % i == 0:
                    break
                elif i == int(math.sqrt(n)):
                    count += 1
    except  EOFError:
        break
print(count)