function Main(input) {
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});
    let A = parseInt(input[0][0], 10);
    let B = parseInt(input[0][1], 10);

    console.log(A * B - A - B + 1);
}



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