object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val a = Array.fill(n)(new java.math.BigDecimal(sc.next()))
  val z = for(i <- 0 until n; j <- i + 1 until n) yield {
    (a(i).multiply(a(j))).toPlainString.split('.')
  }
  val r = z.count(ij => (ij.length == 1 || BigInt(ij(1)) == 0))
  println(r)
}
