program faktor;
var x,y,z: integer;
begin
   readln (x,y);
   writeln (x*(y-1)+1);

end.
