Var a,p,i :integer;beginreadln(p);for a:=100 to 999 doif (a mod p=0) and (a<>p) then i:=a ;writeln(i);end.