import scala.math


object Main extends App {
  val strAry = io.StdIn.readLine().split(' ')
  var mult:Long = 1
  for (i <- strAry){
    mult *= i.toInt 
    }
  if (mult > math.pow(10,18)) println("-1")      
  else println(mult)
}