Problem:
 Score : 300 points    Problem Statement You have a pot and N ingredients. Each ingredient has a real number parameter called value , and the value of the i -th ingredient (1 \leq i \leq N) is v_i .  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.      Constraints  2 \leq N \leq 50  1 \leq v_i \leq 1000  All values in input are integers.         Input Input is given from Standard Input in the following format:  N  v_1  v_2  \ldots  v_N       Output Print a decimal number (or an integer) representing the maximum possible value of the last ingredient remaining.  Your output will be judged correct when its absolute or relative error from the judge's output is at most 10^{-5} .        Sample Input 1 2
3 4      Sample Output 1 3.5  If you start with two ingredients, the only choice is to put both of them in the pot. The value of the ingredient resulting from the ingredients of values 3 and 4 is (3 + 4) / 2 = 3.5 .  Printing 3.50001 , 3.49999 , and so on will also be accepted.       Sample Input 2 3
500 300 200      Sample Output 2 375  You start with three ingredients this time, and you can choose what to use in the first composition. There are three possible choices:   Use the ingredients of values 500 and 300 to produce an ingredient of value (500 + 300) / 2 = 400 . The next composition will use this ingredient and the ingredient of value 200 , resulting in an ingredient of value (400 + 200) / 2 = 300 .  Use the ingredients of values 500 and 200 to produce an ingredient of value (500 + 200) / 2 = 350 . The next composition will use this ingredient and the ingredient of value 300 , resulting in an ingredient of value (350 + 300) / 2 = 325 .  Use the ingredients of values 300 and 200 to produce an ingredient of value (300 + 200) / 2 = 250 . The next composition will use this ingredient and the ingredient of value 500 , resulting in an ingredient of value (250 + 500) / 2 = 375 .   Thus, the maximum possible value of the last ingredient remaining is 375 .  Printing 375.0 and so on will also be accepted.       Sample Input 3 5
138 138 138 138 138      Sample Output 3 138

Solution (Python):
import sys
input=sys.stdin.readline

N = int(input())
V = list(map(int, input().split()))

while(len(V)>1):
    V.sort()
    V.reverse()
    x = V.pop()
    y = V.pop()
    V.append((x+y)/2)
print(V[0])

Solution (Python):
import heapq

N = int(input())
V = list(map(int,input().split()))

heapq.heapify(V)

for _ in range(N-1):
    x = heapq.heappop(V)
    y = heapq.heappop(V)
    heapq.heappush(V,(x+y)/2)

print(V[0])

Solution (Python):
import heapq


def solve(N, Vs):
    h = []
    for v in Vs:
        heapq.heappush(h, v)
    while len(h) >= 2:
        a = heapq.heappop(h)
        b = heapq.heappop(h)
        c = (a + b) / 2
        heapq.heappush(h, c)
    return h[0]


if __name__ == "__main__":
    N = int(input())
    Vs = list(map(int, input().split(" ")))
    print(solve(N, Vs))

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
V = sorted(V)
merged_v = (V[0]+ V[1]) / 2
for i in range(2, N):
    merged_v = (merged_v + V[i]) / 2
print(merged_v)

Solution (Python):
N = int(input())
*V, = map(int, input().split())
V.sort()
c = V[0]
for i in range(1, N):
    c = (c + V[i]) / 2
print("%.16f" % c)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))

a=sorted(a, reverse=True)

ans=0

for i in range(n-1):
    ans+=a[i]/(2**(i+1))

print(ans+a[n-1]/(2**(n-1)))

Solution (Python):
n = int(input())
v = list(map(int,input().split()))

for i in range(n-1):
    v = sorted(v)
    v.append((v[0]+v[1])/2)
    v.remove(v[0])
    v.remove(v[0])

for i in v:
    print(i)

Solution (Python):
a=int(input())
b=list(map(int,input().split()))
b.sort()
c=b[0]

for i in range(1,a):
  c=(c+b[i])/2
  
print(c)

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
v.sort()

ans=(v[0]+v[1])/2
for i in range(2,n):
    ans=(ans+v[i])/2
print(ans)

Solution (Python):
'''
date +%Y.%m.%d

题解先咕着。
'''
def intinput():
    return [int(i) for i in input().split()]

n = intinput()[0]
a = intinput()
a.sort()
for i in range(1, n):
    a[i] = (a[i - 1] + a[i]) / 2
print(a[n - 1])

Solution (Python):






N = int(input())
vs = sorted(list(map(int, input().split())))





kitai = vs[0]
for i in range(1, N):
    kitai = (kitai + vs[i]) /2 
print(kitai)

Solution (Python):
def InputToInt():
    A = input().split()
    for i in range(len(A)):
        A[i] = int(A[i])
    return A


if __name__ == '__main__':
    N=int(input())
    A = InputToInt()
    A.sort()
    su = 0
    for i in range(1, N):
        su += A[-i]*(0.5**i)
    su += A[0]*(0.5**(N-1))
    print(su)

Solution (Python):
n=int(input())-1
*v,=map(int,input().split())
v.sort()
ans=v[0]/2**n
for i in v[1:]:
  ans+=i/2**n
  n-=1
print(ans)

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
v.sort()

ans = 0.0 + v[0]
for i in range(1, N):
    ans = (ans + v[i]) / 2
print(ans)

Solution (Python):

N=int(input())
V=list(map(int,input().split()))

V.sort()

for i in range(N-1):
    V[i+1]= (V[i]+V[i+1])/2

ans=V[-1]
print(str(ans))

Solution (Python):
def f(v, i):
    if i == 0:
        return v/(2**(N-1))
    return v/(2**(N-i))

N = int(input())
V = list(map(int, input().split()))
V.sort()

print(sum(f(V[i], i) for i in range(N)))

Solution (Python):
N = int(input())
V = list(map(int,input().split()))

V.sort()
ans = V[0]
for i in range(1,N):
    ans = (ans + V[i]) / 2
print(ans)

Solution (Python):
N = int(input())
V = list(map(int, input().split()))

V.sort()
m = V[0]
for v in V[1:]:
    m = (m+v)/2
print(m)

Solution (Python):
N = int(input())
v_array = list(map(int,input().split()))

v_array.sort()


v_sum = 0
bairitu = 1
for i,v in enumerate(v_array[::-1]):
    if i != N-1:
        bairitu *= 0.5
    v_sum += bairitu * v

print(v_sum)

Solution (Python):
N = int(input())
v = list(map(int, input().split()))

v.sort()

ans = 0
for idx, value in enumerate(v):
    if idx == 0 or idx == 1:
        ans += value * 1 / (2 ** (N - 1))
    else:
        ans += value * 1 / (2**(N - idx))
print(ans)

Solution (Python):

def main():
	N = int(input())
	V = sorted([int(f) for f in input().split()])
	
	value = V[0]
	V = V[1:]
	for v in V:
		value = (value + v) / 2.0
	print(value)
	
if __name__ == "__main__":
	main()

Solution (Python):
N = input()
v = map(float, raw_input().split())

v.sort()
ans = v[0]
for t in v[1:]:
  ans = (ans+t)/2
print "%.10f"%ans

Solution (Python):
N = int(input())
v = list(map(int,input().split()))
v.sort()
ans = v[0]
for i in range(N-1):
  ans = (ans+v[i+1])/2
print(ans)

Solution (Python):
n = int(input())
v = [int(e) for e in input().split()]
v.sort()
result = v[0]
for i in range(1, n):
  result = (result + v[i]) / 2
print(result)

Solution (Python):
from functools import reduce

n = int(input())
v = list(map(int, input().split()))

v.sort()

print(reduce(lambda x, y: (x + y) / 2, v))

Solution (Python):
import sys
input = sys.stdin.readline

def main():
  n = int(input())
  vlist = list(map(int, input().split()))
  vlist = list(sorted(vlist, key=lambda x: -x))
  ans = 0
  for i, v in enumerate(vlist):
    ans += v / pow(2, i+1)
  ans += vlist[-1] / pow(2, len(vlist))
  print('%.10f' % ans)

if __name__ == '__main__':
  main()

Solution (Python):
N = int(input())
V = list(map(int, input().split(' ')))

V.sort()

ans = V[0]
for i in range(1, N):
    ans = (ans + V[i]) / 2
print(ans)

Solution (Python):
n = int(input())
v = [int(i) for i in input().split()]

v.sort()
a = v[0]
for i in range(1, n):
    a = (a + v[i]) / 2
print(a)

Solution (Python):
from fractions import Fraction

N = int(input())
v_list = list(map(int, input().strip().split()))
v_list.sort()

total = Fraction(v_list.pop(0), 1)
for v in v_list:
	total = (Fraction(v, 1) + total) / 2

print(float(total))

Solution (Python):
N=int(input())
v= list(map(int, input().split()))
v.sort()
t=(v[0]+v[1])/2
for i in range(2,N):
    t=(t+v[i])/2
print(t)

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
A = LIST()

A.sort()
ans = (A[0]+A[1]) / 2
for i in range(2, N):
    ans = (ans+A[i]) / 2
print(ans)

Solution (Python):
_ = input()
V = list(map(int,input().split()))

V.sort()

ansvalue = V[0]

for v in V:
    ansvalue = (ansvalue + v) / 2

print(ansvalue)

Solution (Python):
n=int(input())
v=list(map(int,input().split()))

v.sort(reverse=True)

while len(v)!=1:
    tmp=(v.pop()+v.pop())/2
    v.append(tmp)
print(*v)

Solution (Python):
n = int(input())
li = list(map(int,input().split()))

ans = 0
li.sort()



for i in range(n-1):
    if i == 0:
        ans = (li[i] + li[i+1]) / 2
    else:
        ans = (li[i+1] + ans)/2

        
print(ans)

Solution (Python):
import heapq

n = int(input())
V = list(map(int, input().split()))

heapq.heapify(V)

for i in range(n-1):
    a = heapq.heappop(V)
    b = heapq.heappop(V)
    heapq.heappush(V, (a+b)/2)

print(V[0])

Solution (Python):
n = int(input())

v = list(map(int,input().split()))

while len(v) != 1:
    v = sorted(v)
    
    v.append((v[0]+v[1])/2)
    
    v = v[2:]

print(v[0])

Solution (Python):
N = int(input())
V = list(map(int,input().split()))

V.sort(key= lambda x:-x)

ans =  0
for i,v in enumerate(V):
    ans += v/(2**min(i+1,N-1))

print(ans)

Solution (Python):
n = int(input())
lst = list(map(int,input().split()))
lst.sort()
ans = (lst[0]+lst[1])/2
for i in range(2,n):
    ans = (ans+lst[i])/2
if ans - int(ans) > 0:
    print(ans)
else:
    print(int(ans))

Solution (Python):
N=int(input())
l=list(map(int,input().split()))
l.sort()
be=l[0]
for i in range(N-1):
  be=(l[i+1]+be)/2
print(be)

Solution (Python):
n=int(input())
a=sorted(list(map(int,input().split())))
b=a[0]
for i in range(1,n):
    b=(b+a[i])/2
print(b)

Solution (Python):
words = lambda t : list(map(t, input().split()))
n = int(input())
a = words(int)

a.sort()

cur = a[0]
for i in range(1,len(a)):
    cur = (cur + a[i]) / 2

print(cur)

Solution (Python):
N = int(input())
V = list(map(int, input().split()))

V.sort()
ans = (V[0]+V[1])/2
for i in range(2,N):
    ans = (ans+V[i])/2
print(ans)

Solution (Python):
n = int(input())
v= list(map(int,input().split()))
v.sort()
ave = (v[0]+v[1])/2
for i in range(2,n):
    ave = (ave+v[i])/2
print(ave)

Solution (Python):
_ = input()
v_list = [int(i) for i in input().split()]

v_list_sorted = sorted(v_list)

result = v_list_sorted[0]

for v in v_list_sorted[1:]:
    result = (result + v) / 2

print(result)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
A.sort()
while len(A) > 1:
    temp = (A[0]+A[1])/2
    A.pop(0)
    A.pop(0)
    A.insert(0, temp)
print(A[0])

Solution (Python):
def main():
    n=int(input())
    v=list(map(int, input().split()))
    v.sort()
    av=v[0]
    for i in range(1,n):
        av=(av+v[i])/2
    print(av)
main()

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
vs = sorted(v,reverse=False)
last = 0
for i in range(1,n):
    if i == 1:
        last = (vs[i-1] + vs[i])/2
    else:
        last = (last + vs[i])/2

print(last)

Solution (Python):




n = int(input())
v = list(map(int,input().split()))


v.sort()



sav_v = v[0]
for i in range(1, n):
    sav_v = (sav_v + v[i]) / 2

ans = sav_v


print(ans)

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
v.sort()
ans = v[0] + v[1]
for i in range(N-2):
    ans += (2**(i+1))*v[i+2]

print(ans/(2**(N-1)))

Solution (Python):
N = int(input())
vs = [int(s) for s in input().split()]

import heapq
heapq.heapify(vs)
while len(vs) > 1:
  a = heapq.heappop(vs)
  b = heapq.heappop(vs)
  c = float(a+b)/2
  heapq.heappush(vs, c)
print (vs[0])

Solution (Python):
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce


def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

sys.setrecursionlimit(10000)

mod = 1000000007

"""

a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 



    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())


    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

if __name__ == "__main__":
    N = int(sys.stdin.readline())
    L = list(map(int, sys.stdin.readline().split()))
    L = sorted(L)
    ans = L[0]
    for l in L[1::]:
        ans = (ans + l) / 2
    print(ans)

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
V.sort()

ans = V[0]
V = V[1:]

for v in V:
    ans = (ans + v)/2

print(ans)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
v = sorted(v)
ans = 0
for i in range(n - 1):
    v[i + 1] = (v[i] + v[i + 1]) / 2
print(v[n - 1])

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
v.sort()
ans = v[0]
for i in range(1, n):
    ans = (ans+v[i]) / 2
print(ans)

Solution (Python):
n = int(input())
*V, = map(int, input().split())
V.sort()
a = V[0]
for v in V[1:]:
    a = (a+v)/2
print(a)

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
v.sort(reverse=True)
ans = 0
for i,vi in enumerate(v):
    ans += vi/2**(i+1)
ans += v[-1]/2**(len(v))
print(ans)

Solution (Python):
n = int(input())
v = list(map(int,input().split()))

v.sort()


tmp = 0
for i in range(len(v)-1):
    x = v[0]
    y = v[1]
    v.pop(0)
    v[0] = (x+y)/2

print(v[0])

Solution (Python):
n = int(input())
V = sorted(map(int, input().split()))
result = V[0]
for i in range(1,len(V)):
    result = (result + V[i])/2

print(result)

Solution (Python):
n = int(input())
V = [int(i) for i in input().split()]
V.sort()
ans = V.pop(0)
for v in V:
    ans = (ans+v)/2
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
a.sort()
t = a[0]
for i in range(1, len(a)):
    t += a[i]
    t /= 2
print(t)

Solution (Python):
n = int(input())
v = sorted(list(map(int,input().split())))
ans = v[0]
for i in range(n-1):
    ans = (ans+v[i+1])/2
print(ans)

Solution (Python):
N = int(input())
V = [int(_) for _ in input().split()]

V.sort()

ans = V[0]
for v in V[1:]:
    ans = (ans+v)/2
print(ans)

Solution (Python):

N = int(input())

v = list(map(int,input().split()))

v.sort()


now = v[0]

for i in range(N-1):

    i += 1

    now = (now + v[i]) / 2

print (now)

Solution (Python):
n = int(input())
v = [int(x) for x in input().split()]
v.sort(reverse=True)
t = 2
for i in range(n-1):
    v[i] = v[i]/t
    t = t*2
t = t // 2
v[n-1] = v[n-1]/t
print(sum(v))

Solution (Python):
from heapq import heapify, heappush, heappop
N = int(input())
V = list(map(int, input().split()))

heapify(V)

now_value = 0
while len(V) > 1:
    x = heappop(V)
    y = heappop(V)
    heappush(V, (x+y)/2)

print(heappop(V))

Solution (Python):
import sys
input=sys.stdin.readline
n=int(input())
v_list=list(map(int,input().split()))
v_list.sort()
x=v_list[0]
for i in range(1,n):
    x=(x+v_list[i])/2
print(x)

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

N = int(input())
Vs = list(map(int, input().split()))
Vs.sort()

s = 0
coeff = 1
for i, v in enumerate(Vs):
    if i <= 1:
        s += v
    else:
        coeff *= 2
        s += v * coeff

t = 2 ** (N - 1)

print("{:.15f}".format(s / t))

Solution (Python):
N = int(input())
V = list(map(int, input().split()))

while 1 < len(V):
    V = sorted(V)
    V = [ (V[0] + V[1]) / 2.0 ] + V[2:]

print(V[0])

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True
debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    N = II()
    v_list = LI()

    v_list = sorted(v_list)

    while True:
        if len(v_list) <= 2:
            break
        newv = (v_list[0] + v_list[1]) / 2
        v_list = [newv] + v_list[2:]
        v_list = sorted(v_list)

    print((v_list[0]+v_list[1])/2)

solve()

Solution (Python):
n=int(input())
A=[int(o) for o in input().split()]
ans=0

A.sort()

ans=A[0]
for i in range(1,n):
    ans=(ans+A[i])/2
print(ans)

Solution (Python):
n = int(input())
A = map(int, input().split())

A = sorted(A)


for i in range(n - 1):
    A[i + 1] = (A[i] + A[i + 1]) / 2

print("%.9f" % A[n - 1])

Solution (Python):
N = int(input())
V = list(map(int,input().split()))
V.sort()
for i in range(1,N):
    V[i] = 0.5*(V[i-1] + V[i])
print(V[N-1])

Solution (Python):
a=int(input())
s=list(map(int, input().split(" ") ))
ss = sorted(s)
s0 = ss[0]

for i in ss[1:]:
    s0 = (i+s0)/2
print(s0)

Solution (Python):
import heapq
N = int(input())
v_list = list(map(int, input().split()))

v_list.sort()

heapq.heapify(v_list)

while len(v_list) > 1:
    a = heapq.heappop(v_list)
    b = heapq.heappop(v_list)
    heapq.heappush(v_list, (a+b)/2)
print(heapq.heappop(v_list))

Solution (Python):


import sys
import math
import collections
import itertools
def input(): return sys.stdin.readline().strip()
def gcd(x, y): return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y): return (x * y) // gcd(x, y)
MOD = 10 **9 + 7

N = int(input())



V = [int(x) for x in input().split()]





V.sort()
ans = V[0]

for i, v in enumerate(V) :
    if i == 0 :
        continue
    
    ans = (ans + v) / 2

print(ans)

Solution (Python):
import heapq


INF = float("inf")
MOD = int(1e9 + 7)
def int1(n):
    return int(n) - 1
def parse(*args):
    
    return tuple(p(v) for p, v in zip(args, input().split()))

N = int(input())
V = list(map(int, input().split()))

que = []

for v in V:
	heapq.heappush(que, v)

res = 0
while que:
	v1, v2 = heapq.heappop(que), heapq.heappop(que)
	if not que:
		res = (v1 + v2) / 2
		break
	heapq.heappush(que, (v1 + v2) / 2)

print(res)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))

v.sort()

before = v[0]
for i in v[1:]:
    before = (before + i) / 2

print(before)

Solution (Python):
def main(sample_file = ''):

    """ convenient functions
    
    
    
    
    
    """

    """convenient decorator
    
    
        
        
        
        
        
        
        
        
        
        
    """
    
    
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product 
    
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  
        b, e = 2, 0  
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        numerator = [n - r + k + 1 for k in range(r)]
        denominator = [k + 1 for k in range(r)]
        for p in range(2,r+1):
            pivot = denominator[p - 1]
            if pivot > 1:
                offset = (n - r) % p
                for k in range(p-1,r,p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot
        result = 1
        for k in range(r):
            if numerator[k] > 1:
                result *= int(numerator[k])
        return result
    def combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict 
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest 
    from copy import deepcopy, copy 
    import operator
    from operator import itemgetter 
    
    
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd 
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)
    def make_divisors(n, reversed=False):
        """create list of divisors
        
        Args:
            number (int): number from which list of divisors is created
            reversed (bool, optional): ascending order if False. Defaults to False.
        
        Returns:
            list: list of divisors
        """
        divisors = set()
        for i in range(1, int(n**0.5)+1):
            if n % i == 0:
                divisors.add(i)
                divisors.add(n//i)
        return sorted(list(divisors),reverse=reversed)
    
    
    
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) 
    def modinv(a, p = MOD):
        
        
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        
        
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    class UnionFindTree:
        """union find tree class
        TODO: fix this description...
        how to use (example):
        >>  uf = UnionFindTree(N) 
        >>  if uf.find_root(a) == uf.find_root(b):
        >>      do something
        >>  else:
        >>      do something
        >>      uf.unite(a, b)
        """
        def __init__(self, N):
            self.root = [-1] * (N+1)
            self.rank   = [0]  * (N+1)
            self.connected_num = [1] * (N+1)
    
        def find_root(self,x):
            root = self.root
            while root[x] != -1:
                x = root[x]
            return x
    
        def unite(self,x,y):
            root = self.root
            rank = self.rank
            connected_num = self.connected_num
            find_root = self.find_root
    
            rx = find_root(x)
            ry = find_root(y)
            if rx != ry:
                if rank[rx] < rank[ry]:
                    root[rx] = ry
                    rx,ry = ry,rx
                else:
                    if rank[rx] == rank[ry]:
                        rank[rx] += 1
                    root[ry] = rx       
                connected_num[rx] += connected_num[ry]

    
    
    
    
    

    def BellmanFord(N, M, ABC, vertex_start, vertex_end, value_if_inf = -1, find_shortest = False):
        """to calculate furthest or shortest length between vertex_start and vertex_end using BellmanFord algorithm
        
        Args:
            N (int): number of vertices
            M (int): number of edges
            ABC (list): [(ai, bi, ci) for _ in range(N)] where i-th edge is directed from vertex ai to vertex bi and the length is ci 
            vertex_start (int): start vertex. usually use 0.
            vertex_end (int): end vertex. usually use N-1.
            value_if_inf (int or string as you like, optional): value you want when the furthest (or shortest) distance is infinite (or -infinite). Defaults to -1.
            find_shortest (bool, optional): choose False to find furthest path. Defaults to False.
        
        Returns:
            int or string: normally int (but can be str if you set value_if_inf to str)
            
        Example:
                N, M, P = R()
                ABC = [R() for _ in range(M)]
                ABC = [(a-1, b-1, c-P) for a, b, c in ABC]
                print(BellmanFord(N, M, ABC, 0, N-1, value_if_inf = 'inf'))

        """

        def make_reachable_list(N, M, ABC, vertex_start, vertex_end):
            reachable_to_direct = defaultdict(list)
            reachable_from_direct = defaultdict(list)
            reachable_from_start = [False] * N
            reachable_to_end = [False] * N
            reachable_from_start[vertex_start] = True
            reachable_to_end[vertex_end] = True
            reachable_from_both_sides = [False] * N
            dfs_from_start = []
            dfs_to_end = []
            for a, b, c in ABC:
                reachable_to_direct[a].append(b)
                reachable_from_direct[b].append(a)
                if a == vertex_start:
                    dfs_from_start.append(b)
                    reachable_from_start[b] = True
                if b == vertex_end:
                    dfs_to_end.append(a)
                    reachable_to_end[a] = True
            while dfs_from_start:
                v = dfs_from_start.pop()
                for i in reachable_to_direct[v]:
                    if not reachable_from_start[i]:
                        reachable_from_start[i] = True
                        dfs_from_start.append(i)
            while dfs_to_end:
                v = dfs_to_end.pop()
                for i in reachable_from_direct[v]:
                    if not reachable_to_end[i]:
                        reachable_to_end[i] = True
                        dfs_to_end.append(i)
            for i in range(N):
                reachable_from_both_sides[i] = reachable_from_start[i] and reachable_to_end[i]
            return reachable_from_both_sides
        
        reachable_from_both_sides = make_reachable_list(N, M, ABC, vertex_start, vertex_end)
        
        if find_shortest:
            dist = [INF for i in range(N)]
        else:
            dist = [-INF for i in range(N)]
        
        dist[vertex_start] = 0
        for i in range(N):
            updated = False
            for a, b, c in ABC:
                if not reachable_from_both_sides[a]:
                    continue
                elif find_shortest:
                    update_condition = dist[a] + c < dist[b]
                else:
                    update_condition = dist[a] + c > dist[b]
                if dist[a] != INF and update_condition:
                    dist[b] = dist[a] + c
                    updated = True
                    if i == N-1:
                        return value_if_inf
            if not updated:
                break
        return dist[vertex_end]

    """ initialize variables and set inputs
    
        
        
    
        
        
        
        
        
        
        
    
        
        
        
        
    
        
        
    """

    
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    R = lambda: list(map(int, r().split()))
    Rmap = lambda: map(int, r().split())
    Rfloat = lambda: list(map(float, r().split()))
    Rtuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    
    
    
    
    
    
    
    """

    
    if sample_file:
        sys.stdin = open(sample_file)
        
    
    

    N = int(r())
    V = R()
    heapify(V)
    for _ in range(N-1):
        a = heappop(V)
        b = heappop(V)
        heappush(V, (a+b)/2)
    print(*V)
    
    
    

    
    
    

    """memo: how to use defaultdict of list
    
    Dic = defaultdict(list)
    
    Dic[x].append(y)
    
    for k, v in Dic.items():
    """
    
    """memo: how to solve binary problems
    
    >>> a = 5
    >>> bin_str_a = format(a, '
    >>> print(bin_str_a)
    0b0101 
    """
    
    """memo: how to solve the problem
    creating simple test/answer
    greed
    simple dp
    graph
    """

if __name__ == '__main__':
    main()