require 'bigdecimal'

N = gets.chomp.to_i

count = 0

a_n = []
N.times do |i|
  a_n << BigDecimal(gets.chomp)
end

a_n.combination(2) do |a_i, a_j|
  count += 1 if a_i * a_j == (a_i * a_j).to_i
end

puts count