a = []
cnt = 0

while n = gets
  ax = n.chomp.split
  a[cnt] = ax.to_i
  cnt += 1

  for i in 2..cnt
    for j in 2..cnt
      if n % i == 0
        break
      end
    end
    if i == j
      count = count + 1
    end
  end
end
  puts count