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