N = gets.to_i
A = []
N.times{
  tmp = gets.chomp
  if tmp.split(".").size == 1
    A.push(tmp.to_i * 10**9)
  else
    A.push((Rational(tmp) * 10**9).to_i)
  end
}

count = 0

0.upto(N-2){ |i|
  (i+1).upto(N-1){ |j|
    #puts A[i], A[j]
    tmp = A[i] * A[j]
    #p tmp
    if (tmp % 10**18) == 0
      #puts 'yes'
      count += 1
    end
    #puts
  }
}

puts count
