#include <iostream>
using namespace std;
int main () {
long m, n, p;
cin >> m >> n;
p= (m*n - (m + n - 1)) + 1;
cout << p << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPiAgICAgCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluICgpIHsKICAgIGxvbmcgbSwgbiwgcDsKICAgIGNpbiA+PiBtID4+IG47CglwPSAobSpuIC0gKG0gKyBuIC0gMSkpICsgMTsKICAgIGNvdXQgPDwgcCA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0=