N=int(input())
a=[int(i) for i in input().split()]

ave=(sum(a)/N)

ave_a=[abs(i-ave) for i in a]
print(ave_a)

ans=101
thum=101
for i in range(N):
    if ave_a[i]<thum:
        thum=ave_a[i]
        ans=i

print(ans)