n = int(input())
flame_list = [ int(v) for v in input().split() ]

mean = sum(flame_list)

if mean % 2 == 0:
  print(flame_list.index(mean//2))
else:
  print(min(flame_list.index((mean-1)//2),flame_list.index((mean+1)//2)))