object Main extends App {
    val arr = io.StdIn.readLine.split(" ").map(_.toLong)

    if (arr.forall(_%2!=0)) {
        val other = arr.sorted.init
        println(other.product)
    } else println(0)
}