var a,max: integer;
begin
readln(max);
repeat
readln(a);
if a>max then max:=a;
until a=0;
writeln(max);
end.
var a,max: integer;
begin
readln(max);
repeat
readln(a);
if a>max then max:=a;
until a=0;
writeln(max);
end.