object Solution { def main(args: Array[String]) { val nm = io.StdIn.readLine.split(" ").map(_.toLong) println(nm(0)*nm(1) - 1) } }