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