'use strict'

function main(arg) {
    let A = parseInt(arg.split(" ")[0]);
    let B = parseInt(arg.split(" ")[1]);
    console.log((A * B) - (A + B - 1));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));