uses crt;
const fi='input.txt'
var f1:text;
a:array[1..100]of integer;
n,i,max:integer;
begin
clrscr;
assign(f1,fi); rewrite(f1);
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
max:=a[1];
for i:=1 to n do
if max<a[i] then max:=a[i];
writeln(f1,max);
close(f1);
readln;
end.