var
i:integer;
begin
for i:=100 to 999 do
if ((i+1) mod 2=0) and ((i+2) mod 3 =0) and ((i+3) mod 4=0) and ((i+4) mod 5 =0)
then writeln(i);
end.
var
i:integer;
begin
for i:=100 to 999 do
if ((i+1) mod 2=0) and ((i+2) mod 3 =0) and ((i+3) mod 4=0) and ((i+4) mod 5 =0)
then writeln(i);
end.