import java.util.Scanner

fun main(args: Array<String>){
	val sc = Scanner(System.`in`)
	val s = sc.nextLine().split(" ")
	val A = Integer.parseInt(s[0])
	val B = Integer.parseInt(s[1])

	println(A*B-A-B+1)
}