var a:array[1..200000000] of int32; n,i,b,nmax,nmin,k:integer;max,min:int32;
begin
read(n);nmax:=0;nmin:=0;
for i:=1 to n do
begin
read(a[b]);
if (a[b]>=max)or(nmax=0)then max:=a[b];
if (a[b]<=min)or(nmin=0)then min:=a[b];
end;
for i:=1 to n do
begin
if a[b]>0 then begin
repeat
k:=k+1;
a[b]:=a[b]-1;
until a[b]<=0;

end;
end;
write(max);

end.



