var a:array of integer;
N,i,max,k:integer;
BEGIN
readln(N);
SetLength(a,N);
max:=-1001;
for i:=0 to N-1 do begin
read(a[i]);
if (a[i]>max) then begin
max:=a[i];
k:=i;
end;
writeln(k);
for i:=0 to N-1 do
write(a[i],' ');
end.
var a:array of integer;
N,i,max,k:integer;
BEGIN
readln(N);
SetLength(a,N);
max:=-1001;
for i:=0 to N-1 do begin
read(a[i]);
if (a[i]>max) then begin
max:=a[i];
k:=i;
end;
end;
writeln(k);
for i:=0 to N-1 do
write(a[i],' ');
end.