106
function f(x: integer): integer;
var
L, M: integer;
begin
L := x - 12;
M := x + 12;
while L <> M do
if L > M then
L := L - M
else
M := M - L;
f := L;
end;
begin
var x := 100;
var r := 0;
repeat
x := x + 1;
r := f(x);
until r = 2;
writeln(x);
end.