function Main(input) {
	input = input.split(" ");
	const a = parseInt(input[0], 10) - 1;
	const b = parseInt(input[1], 10) - 1;
	console.log('%d', a * b);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));