var I,C,x:integer; begin read(C,I); x:=((I-1)*C)+1; writeln(x); end.