// A - Garden
// https://abc106.contest.atcoder.jp/tasks/abc106_a

import scala.io.StdIn.readLine

object Main extends App {

  val Array(a, b) = readLine.split(" ").map(_.toInt)

  val area = (a - 1) * (b - 1)

  println(area)

}