var x,min:integer;beginmin:=999999;repeatreadln(x);if (min>x) and (x<>0) then min:=x;until x=0;writeln(min);end.
var x,min:integer;
begin
min:=999999;
repeat
readln(x);
if (min>x) and (x<>0) then min:=x;
until x=0;
writeln(min);
end.