n = int(input())
a_lis = list(map(int, input().split()))
a_sum = sum(a_lis)
a_avg = a_sum / n
minimum = 1000
ans = 0
for i in a_lis:
    n = abs(a_avg - i)
    if n < minimum:
        minimum = n
        ans = i
print(a_lis.index(ans))

283242f7d2c7539143792171129994e3f187d7d6
<mask token>

<mask token>
for i in a_lis:
    n = abs(a_avg - i)
    if n < minimum:
        minimum = n
        ans = i
print(a_lis.index(ans))

n = int(input())
a_lis = list(map(int, input().split()))
a_sum = sum(a_lis)
a_avg = a_sum / n
minimum = 1000
ans = 0
for i in a_lis:
    n = abs(a_avg - i)
    if n < minimum:
        minimum = n
        ans = i
print(a_lis.index(ans))
