Program t_1; const size=100; var a:array[1..size] of integer; i,n:integer;procedure quicksort(m1,t1:integer); var i1,j1,x1,w:integer; begin i1:=m1; j1:=t1; x1:=a[(m1+t1)div 2]; repeat while a[i1]<x1 do inc(i1); while a[j1]>x1 do dec(j1); if i1<=j1 then begin w:=a[i1]; a[i1]:=a[j1]; a[j1]:=w; inc(i1); dec(j1); end until i1>j1; if m1<j1 then quicksort(m1,j1); if i1<t1 then quicksort(i1,t1);end;begin readln(n); for i:=1 to n do read(a[i]); quicksort(1,n); writeln(a[n]);end.