Var a:array[1..1000000]of integer; i,min,n,c:integer; begin readln(n); for i:=1 to n do begin read(a[i]); if i = 1 then min:=a[i]; if a[i]<min then begin min:=min+a[i] ; a[i]:=min - a[i]; min:=min - a[i]; c:=i; end; end; writeln('a[',c,']=',min); end.
a:array[1..1000000]of integer;
i,min,n,c:integer;
begin
readln(n);
for i:=1 to n do
begin
read(a[i]);
if i = 1 then
min:=a[i];
if a[i]<min then
begin
min:=min+a[i] ;
a[i]:=min - a[i];
min:=min - a[i];
c:=i;
end;
end;
writeln('a[',c,']=',min);
end.