// parameter "input" gets all data
function Main(input) {
	// the first line is assigned to input[0], the second line is assigned to input[1] similarly.
	input = input.split(" ");
	// convert string from integer using "parseInt"
	var a = parseInt(input[0], 10);
	var b = parseInt(input[1], 10);
	//output
	console.log('%d',a*b-a-b+1);
}
// Don't edit this line!


Main(require("fs").readFileSync("/dev/stdin", "utf8"));