n = gets.chomp.to_i

arr = n.times.map { (gets.chomp.to_f * (10 ** 9)) }

den = 10 ** 18

count = 0
(0...arr.length).each { |i|
    ((i + 1)...arr.length).each { |j|
        mal = arr[i] * arr[j]
        res = mal % den
        if res == 0 && res - res.to_i == 0
            count += 1
        end
    }
}

puts count