var c,i,r:integer;
begin
readln(c,i);
r:=c*i;
writeln(r-(c-1));
end.

