li = lambda: list(map(int, input().split()))
N = int(input())
V = li()
V.reverse()
ans = 0
for i in range(N-1):
  if i == 0:
    v1, v2 = V[i], V[i+1]
    ans = (v1 + v2) / 2
  else:
    ans = (ans + V[i+1]) / 2
print(ans)
  
