'use strict'

function main(input) {
  input = input.split('\n')[0].split(' ');
  const a = Number(input[0]);
  const b = Number(input[1]);

  const ans = (a * b) - (a + b - 1);
  console.log(ans);
}

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