Var
i,j,n,k: integer;
a,b:array[1..20]of integer;
begin
writeln('Введите N');
readln(n);
for i:=1 to n do
begin
readln(a[i]);
b[i]:=a[i];
end;
for i:=1 to n do
for j:=1 to n do
if b[i]>b[j] then
begin
k:=b[i];
b[i]:=b[j];
b[j]:=k
end;
for i:=1 to n do
if a[i]=b[2] then k:=i;
writeln('k=',k);
end.