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