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