program bla1;
var c,i,d:integer; s:real;
begin
readln(c,d);
repeat
i:=i+1;
s:=i/c;
if round(s)<s then s:=round(s)+1 else s:=round(s);
until s=d;
writeln(i);
end.
