val a = input.split(LINE_SEPARATOR).tail.head.split(" ").map(_.toLong)
    var flag = false
    val res = a.foldLeft(1L){(res, l) =>
      val lim = Math.pow(10, 18).toLong
      val temp = res * l
      if (res * l > lim) flag = true
      res * l
    }
    (if (flag && res != 0) -1L else res).toString