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