num = int(input())
V = [int(x) for x in input().split()]
kekka = []
i = 0
while i <= len(V):
  hi = (V[i] + V[i + 1]) / 2
  kekka.append(hi)
  if hi > max(V):
    V.append(hi)
  i += 1
  
print(max(kekka))