uses crt;
var a,d:array[1..100]of integer;
i,n,dem:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
dem:=0;
for i:=1 to n do
if a[i]>0 then
begin
inc(dem);
b[dem]:=a[i];
end;
writeln('So duong cuoi cung trong mang la: ',b[dem]);
readln;
end.