n = gets.to_i
as = []
n.times do
  as << gets.to_i
end

num = 0
as.each do |a|
  (2..a).each do |j|
    #puts "#{j} = #{a}" if j == a
    num += 1 if j == a
    break if a % j == 0
  end
end

puts num