"use strict";

const receive = () => require("fs").readFileSync("/dev/stdin", "utf8").split(/\s/);

const main = input => {
  const A = Number(input[0]);
  const B = Number(input[1]);
  const ans = A * B - (A + B - 1)
  console.log(ans);
};

main(receive());