a = int(input())
List=[int(i) for i in input().split()]
List.sort()
print(List)
num = 0
ans = []
while num < a:
  res = (List[num] + List[num+1])/2
  ans.append(res)
  resa = (ans[num] + List[num+2])/2
  if num == a:
  print(resa)
  num = num + 1
