object Main extends App {
  import io.StdIn.readLine
  val xs = readLine().split("_").map(_.toLong)
  val M   = 1e+18.toLong
  val Array(x, rest @ _*) = xs
  val n = rest.foldLeft(x)((a, b) => a * b)
  // println(xs.mkString(",") + " ==>")
  println(if (-1 < n && n <= M) n else -1)
}