from collections import *
from itertools import *

N = int(input())

A = map(int, input().split())
SA = SB = 0
ABI = sorted((((b:=max(N-i, i-1)*a), (SA:=SA+a), (SB:=SB+b)) and (a, b, i) for i, a in enumerate(A, 1)), reverse=True)


print(1)
