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):
n = int(input())
v = list(map(int, input().split()))

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

Solution (Python):
import heapq

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

h = []
for value in v:
  heapq.heappush(h, value)

for i in range(n-1):
  v1 = heapq.heappop(h)
  v2 = heapq.heappop(h)
  mixed = (v1 + v2) / 2
  heapq.heappush(h, mixed)

print(h[0])

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

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

Solution (Python):


import sys,collections,itertools,re,math,fractions,decimal,random,array,bisect,heapq





def solve(f):
    n = f.read_int()
    v = f.read_int_list()

    v.sort()
    ans = v[0]
    for vi in v[1:]:
        ans = (ans+vi)/2.0

    return ans


class Reader(object):
    def __init__(self, filename=None):
        self.file = open(filename) if filename is not None else None
        self.case = 1

    def __readline(self):
        return self.file.next().strip() if self.file else raw_input()

    def next_case(self):
        self.file.next()
        self.case += 1

    def read_int(self): return int(self.__readline())
    def read_float(self): return float(self.__readline())
    def read_long(self): return long(self.__readline())
    def read_decimal(self): return decimal.Decimal(self.__readline())
    def read_str(self): return self.__readline()

    def read_int_list(self): return map(int, self.__readline().split())
    def read_float_list(self): return map(float, self.__readline().split())
    def read_long_list(self): return map(long, self.__readline().split())
    def read_decimal_list(self): return map(decimal.Decimal, self.__readline().split())
    def read_str_list(self): return self.__readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv) > 1 else None
    f = Reader(filename)
    if f.file:
        while True:
            print "Case 
            try:
                f.next_case()
            except StopIteration:
                break
    else:
        print solve(f)

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

print(v[n-1])

Solution (Python):



N = int(input())
v = list(map(int,input().split()))
v.sort()
i = 0

for i in range(N-1):
    n = (v.pop(0) + v.pop(0))/2
    v.insert(0,n)

print(v[0])

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

Solution (Python):
N = int(input())
V = [int(e) for e in input().split()]
while len(V) != 1:
  V.sort()
  tmp = V[0] + V[1]
  del V[0]
  del V[0]
  V.append(tmp/2)

print(V[0])

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

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

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

r = V[0]

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

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

V.sort()
result = (V[0] + V[1]) / 2

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

Solution (Python):
import decimal

n = int(input())
arr = list(map(decimal.Decimal, input().split()))

arr.sort()

while len(arr) > 1:

    s = decimal.Decimal(0)

    s += arr.pop(0)
    s += arr.pop(0)

    arr.append(s / 2)

    arr.sort()

print(arr[0])

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

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


v.sort()

tem = v[0]+v[1]
for i in range(2,n):
    tem += 2**(i-1) * v[i]

result = tem/(2**(n-1))
print(result)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a = II()
    s = input()
    print(s if a >= 3200 else "red")
    return


def B():
    II()
    a = LI()
    ans = 0
    for ai in a:
        ans += 1 / ai
    print(1/ans)
    return


def C():
    n = II()
    v = LI()
    q = []
    for vi in v:
        heappush(q, vi)
    while 1:
        a = heappop(q)
        if q:
            b = heappop(q)
            heappush(q, (a + b) / 2)
        else:
            print(a)
            return


def D():
    n, q = LI()
    tree = [[] for i in range(n)]
    for _ in range(n - 1):
        a, b = LI_()
        tree[a].append(b)
        tree[b].append(a)
    ans = [0] * n
    c = defaultdict(int)
    def dfs(now):
        for nex in tree[now]:
            if c[nex]:
                continue
            c[nex] += 1
            ans[nex] += ans[now]
            dfs(nex)
    for _ in range(q):
        p, x = LI_()
        x += 1
        ans[p] += x
    c[0] = 1
    dfs(0)
    print(*ans)
    return


def E():
    return


def F():
    return


if __name__ == '__main__':
    C()

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

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

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

mix_parts = (v_list.pop(0) + v_list.pop(0)) / 2

while True:
    try:
        mix_parts = (mix_parts + v_list.pop(0)) / 2
    except IndexError:
        break

print(mix_parts)

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

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

sorted_vs = sorted(vs)

ans = sorted_vs[0]

for vs in sorted_vs[1:]:
    ans = (ans + vs) / 2

print(ans)

Solution (Python):
import heapq

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

heapq.heapify(v)
work = heapq.heappop(v)

for _ in range(n - 1):
    work += heapq.heappop(v)
    work /= 2

print(work)

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

m = min(lis)
lis.remove(min(lis))
m_2 = min(lis)
lis.remove(min(lis))
v = (m + m_2) / 2   

for i in range(0, N - 2):
    v = (v + min(lis)) / 2
    lis.remove(min(lis))

print(v)

Solution (Python):
from heapq import heapify, heappop, heappush

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

heapify(v)

for _ in range(1, N):
    a = heappop(v)
    b = heappop(v)
    heappush(v, (a+b)/2)

print(v[0])

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

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

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

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

lis_v.sort()

while len(lis_v) != 1:
      before = lis_v.pop(0)
      lis_v[0] = ((before + lis_v[0])/2)


print(lis_v[0])

Solution (Python):
n=int(input())
l=[float(i) for i in input().split()]
l.sort()
while len(l)>1:
    
    a,b=l[0],l[1]
    av=(a+b)/2
    del l[0]
    del l[0]
    l.append(av)
    l.sort()
print(l[0])

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

Solution (Python):
N = int(input())
l = list(map(int, input().split()))
while 1 < len(l):
    l = sorted(l, reverse=True)
    m = (l.pop() + l.pop()) / 2
    l.append(m)
print(l[0])

Solution (Python):
import heapq

N = int(input())
V = list(map(int, input().split()))
heapq.heapify(V)
for i in range(N-1):
    min_1 = heapq.heappop(V)
    min_2 = heapq.heappop(V)
    ave = (min_1 + min_2)/2
    heapq.heappush(V, ave)
print(V[0])

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

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

v_sort = sorted(v)

temp = v_sort[0]
for i in range(1, N):
    temp = (temp + v_sort[i]) / 2

print(temp)

Solution (Python):
n = int(input())
v = list(map(int,input().split()))
v.sort()
ans = 0
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()))
minimum1 = 0

minimum2 = 0


for i in range(n-1):
    ans = 0
    minimum1 = min(v)
    del v[v.index(minimum1)]
    minimum2 = min(v)
    del v[v.index(minimum2)]
    ans = ans+((minimum1+minimum2)/2)
    v.append(ans)


print(v[0])

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

answer = li_v[0]

for i in range(1, n):
    answer = (answer + li_v[i]) / 2
print(answer)

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

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

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

result = 0
tmp = v_sort[0]
for i in range(N-1):
   tmp = float((1/2)*(tmp+v_sort[i+1]))

print(tmp)

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

print(b)

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=[float(x) for x in input().split()]

v.sort()

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

print(t)

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

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

while(len(v)) > 1:
  v = sorted(v)
  v1 = v.pop(0)
  v2 = v.pop(0)
  v.append((v1+v2)/2)
  
print(v[0])

Solution (Python):
from heapq import heappush, heappop
import math

n = int(input())
v = list(map(int, input().split()))
hq = []
for i in range(n):
    heappush(hq, v[i])
for i in range(n-1):
    b = heappop(hq)
    c = heappop(hq)
    heappush(hq, (b+c)/2)
print(sum(hq))

Solution (Python):
from heapq import *

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

h = []
for i in range(n):
    heappush(h, v[i])

for i in range(n-1):
    x, y = heappop(h), heappop(h)
    heappush(h, (x + y) / 2)

print(h[0])

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

V.sort()

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

print(pre)

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

v = sorted(v)

ans = v[0]

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

Solution (Python):

import sys


def solve(N: int, v: "List[int]"):
    v.sort()

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


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  
    v = [int(next(tokens)) for _ in range(N)]  
    solve(N, v)


if __name__ == "__main__":
    main()

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
print(V[-1])

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

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

print(ans)

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

lis_v.sort()
while len(lis_v) != 1:
    base = lis_v.pop(0)
    lis_v[0] = (lis_v[0] + base)/2

print(lis_v[0])

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

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

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

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

print(V[N-1])

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

vlist.sort()

for i in range(n-1):
    kari = (vlist[0]+vlist[1])/2
    vlist[0] = kari
    del vlist[1]

print(vlist[0])

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

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()
ans=0
ans+=v[0]/2**(n-1)
j=n-1
for i in range(1,n):
    ans+=v[i]/2**j
    j-=1
print(ans)

Solution (Python):
N = int(input())
v = sorted(list(map(int, input().split())))
while len(v) != 1:
    num = (v[0] + v[1])/2
    v.pop(0)
    v.pop(0)
    v.insert(0, num)
print(v[0])

Solution (Python):
import heapq

N = int(raw_input())
v = list(map(int,raw_input().split()))
heapq.heapify(v)
for i in range(0,N-1):
  v1 = heapq.heappop(v)
  v2 = heapq.heappop(v)
  
  heapq.heappush(v, (v1+v2)/float(2))
print v[0]

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





v.sort()

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

print(v[0])

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

from heapq import *
n=int(input())
v=map(int,input().split())
u=[]
for i in v:
  heappush(u,i)

for j in range(n-1):  
  a1=heappop(u)
  a2=heappop(u)
  ave=(a1+a2)/2
  heappush(u,ave)
print(u[0])

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

v.sort(reverse=True)

for i in range(n-1):
  v.append((v.pop() + v.pop()) / 2)
  
print(v[0])

Solution (Python):
from heapq import heapify, heappop, heappush
N = int(input())
v = [int(i) for i in input().split()]

heapify(v)
while len(v) > 1:
    x, y = heappop(v), heappop(v)
    heappush(v, (x + y)/2)
print(v[0])

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

print(ans)

Solution (Python):
number =int(input())
powers =input().rstrip().split()


values=[]
for i in range(number):
  values.append(int(powers[i]))
ordered = sorted(values)

answer=0
for i in range(number):
  answer=answer+((1/2)**(number-i))*int(ordered[i])

trueanswer=answer+int(ordered[0])*(1/2)**number
print(trueanswer)

Solution (Python):
try:
    N = int(input())
    if N>1 and N<51:
        S = input()
        A = S.split()
        A = list(map(float, A))
        A.sort()
        result = A[0]
        
        if all(len(A)==N and i > 0 and i < 1001 for i in A):
                for i in range(1, N):
                    result = (result+A[i])/2

    print(result)
                                        
except:
    print("Error")

Solution (Python):


n = int(input())
e=[]
s=[int(i) for i in input().split()]
for i in range(n):
    e.append(s[i])
e.sort()

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

Solution (Python):
import heapq

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

h = []
for i in v:
    heapq.heappush(h, i)

while len(h) != 1:
    min1 = heapq.heappop(h)
    min2 = heapq.heappop(h)
    heapq.heappush(h, (min1 + min2) / 2)

print(heapq.heappop(h))

Solution (Python):


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

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

print(v_list[0])

Solution (Python):
n = int(input())
a_list = list(map(int, input().split()))
a_list = reversed(sorted(a_list))
sum = 0
for index, a in enumerate(a_list):
  sum += pow(0.5, index+1) * a
  if index == n-1:
    sum += pow(0.5, index+1) * a

print(sum)

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

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

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

diviser = 2
ans = 0
for val in V[:N-1]:
    ans += val / diviser
    diviser *= 2
    
diviser //= 2
ans += V[-1] / diviser

print(ans)

Solution (Python):
from functools import reduce

n = input()
value_strings = input().split(' ')

values = list(map(int, value_strings))
values.sort()

max_value = reduce((lambda x, y: (x + y) / 2), values)
print(max_value)

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

v.sort()

for i in range(len(v)-1):
    v[-1-i] /= 2**(i+1)
v[0] /= 2**(len(v)-1)

ans = sum(v)

print(ans)

Solution (Python):
import heapq

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

heapq.heapify(v) 

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

Solution (Python):
N=int(input())
V=sorted(list(map(int,input().split())))
while len(V)!=1:
  num=(V[0]+V[1])/2
  V.pop(0)
  V.pop(0)
  V.insert(0,num)
print(V[0])

Solution (Python):
from sys import stdin
n = int(stdin.readline().rstrip())
li = list(map(int,stdin.readline().rstrip().split()))
li.sort()
while len(li) > 1:
    a = li[0] + li[1]
    li.pop(0)
    li.pop(0)
    b = a/2
    li.insert(0,b)
print(li[0])

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

s.sort()
sums=0
for i in range(N):
    if i<=1:
        sums=sums+s[i]
    else:
        sums=sums+s[i]*(2**(i-1))
sums=sums/(2**(N-1))
print(sums)

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

for i in range(N-1):
 min1 = heapq.heappop(V)  
 min2 = heapq.heappop(V)  
 num = (min1+min2)/2
 heapq.heappush(V,num)  

ans = heapq.heappop(V)
print(ans)

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):

import sys


def solve(N: int, v: "List[int]"):
    v.sort()

    res = v[0]
    for i in v[1:]:
        res += i
        res /= 2

    print(res)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    v = [ int(next(tokens)) for _ in range(N) ]  
    solve(N, v)

if __name__ == '__main__':
    main()

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

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

print(L[N-1])

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

Solution (Python):
N = int(input())
A = [int(x) for x in raw_input().split(' ')]
A.sort()
res = (A[0] + A[1]) / 2.0
for i in xrange(2, N):
    res = (res+A[i]) / 2.0
print(res)

Solution (Python):
_,*a=map(int,open(0).read().split());a.sort();ans=a.pop(0)
for i in a:ans=(ans+i)/2
print(ans)

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())
A = sorted(list(map(int, input().split())))

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

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

Solution (Python):
a = int(input())
b = list(map(int, input().split()))
while (len(b) > 1):
    b = sorted(b)
    x = b.pop(0)
    y = b.pop(0)
    b.append((x+y)/2)
print(b[0])

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

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

print(w)

Solution (Python):
import sys
sys.setrecursionlimit(100000)

def ii(): return int(input())
def iil(): return list(map(int, input().split()))

n = ii()
v = iil()
v.sort()
ans = v[0]
for i in v[1:]:
    ans = (ans+i)/2
print(ans)

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

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

while len(v) > 1:
    new = (v[0] + v[1])/2
    del v[0:2]
    v.insert(0, new)

print(v[0])

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

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

v_ = sorted(v)

half = v_[0]
for i in range(1, len(v)):
    half = ( half + v_[i] ) / 2
print(half)

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

v_ = sorted(v)

half = v_[0]
for i in range(1, len(v)):
    half = ( half + v_[i] ) / 2
print(half)

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

for i in range(N-1):
    min1 = min(V) 
    V.remove(min1)
    min2 = min(V)
    V.remove(min2)
    V.append( (min1+min2) / 2 )

print(V[0])

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
v = sorted(v, key=lambda x: -x)

while len(v) > 2:
  v.append((v.pop() + v.pop())/2)
print((v[0]+v[1])/2)

Solution (Python):
n=int(input())
v=[int(x) for x in input().split()]
for c in range(n-1):
    a=min(v)
    v.remove(a)
    b=min(v)
    v.remove(b)
    v.append((a+b)/2)
print(v[0])

Solution (Python):
N = int(input())
V = sorted(list(map(int, input().split())))
ans = V.pop(0)

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

print(ans)

Solution (Python):
c = int(input())
b = list(map(int, input().split()))

b.sort()
res = b[0]

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

print(res)

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

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

Solution (Python):

length = input()

values = input().split()
for i in range(len(values)):
  values[i] = int(values[i])
values.sort()

for i in range(len(values)-1):
  values[i+1] += values[i]
  values[i+1] = values[i+1]/2
print(values[len(values)-1])

Solution (Python):
n = int(input())
a = (input()).split(" ")
sumv = 0
temp = []
for i in range(n):
    temp.append(int(a[i]))
temp.sort()
for i in range(n-1):
    if(i==0):
        sumv =  (temp[i] + temp[i+1])/2
    else:
        sumv = (sumv + temp[i+1])/2
print(sumv)

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

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

v.sort(reverse=True)

out=0

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

out+=v[N-1]/(2**(N-1))

print(out)

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

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

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

Solution (Python):
import heapq

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

def nabe(v):
    
    if len(v) == 1:
        return v[0]

    smallests = heapq.nsmallest(2, v)

    for s in smallests:
        v.remove(s)
    v.append(sum(smallests) / 2)

    return nabe(v)

print(nabe(v))

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

a.sort()
for i in range(n):
  if i == 0:
    a[0] /= 2**(n-1)
  else:
    a[i] /= 2**(n-i)

print(sum(a))

Solution (Python):


N = int(input())
v = list(map(int, input().split()))
s = sorted(v)
c = s[0]
for i in range(1, N):
    c = (s[i] + c) / 2
print(c)

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


A.sort()
val = A[0]
for i in range(N - 1):
    val = (val + A[i + 1]) / 2

print(val)

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

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

Solution (Python):
a = int(input())
l=(list(map(int ,input().split())))
l.sort()
ll=[]
j=0
r=(l[0]+l[1])/2
ll.append(r)
for i in range(a-2):
        j=(ll[0]+l[i+2])/2
        ll.append(j)
        ll.remove(ll[0])
print((ll[0]))

Solution (Python):
N = int(input())
S = input()
X = S.split(" ")
temp = 0
ing = []

for i in X:
    ing.append(int(i))
ing.sort()


for i in range(N-1):
    temp = (ing[0] + ing[1])/2
    ing.pop(0)
    ing.pop(0)
    ing.insert(0,temp)

print(ing[0])

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=sorted(list(map(int,input().split())))
b=0
for i in range(n-1):
    b=(v.pop(1)+v.pop(0))/2
    v.append(b)
    v.sort()
print(b)

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

a.sort()

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

print(a[0])

Solution (Python):

 
N = int(input())
v = [int(a) for a in input().split()]
 
v.sort()
 
for i in range(N-1):
    tmp = (v[0]+v[1])/2
    v.pop(0)
    v.pop(0)
    v.insert(0,tmp)
    v.sort()
 
print(v[0])

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

Solution (Python):
n=input()
n=int(n)
val=list(map(int,input().strip().split(' ')))
val.sort()
res=0
if val and n>=2:
    if len(val)==1:
        print(val[0]/2)
    elif len(val)==2:
        print((val[0]+val[1])/2)
    else:
        
        res=(val[0]+val[1])/2
        for i in range(2,len(val)):
            res=(res+val[i])/2
           
        print(res)
else:
    
    pass

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

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

ans = a[0]

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

print(ans)

Solution (Python):

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

list_v.sort(reverse=True)

while len(list_v)!=2:
    x = list_v.pop()
    y = list_v.pop()
    list_v.append((x+y)/2)
    
x = list_v.pop()
y = list_v.pop()
print((x+y)/2)

Solution (Python):

N=int(input())

A=input().split()
B=[0]*N

for i in range(len(A)):
    B[i]=int(A[i])

B.sort()
B[0]=B[0]/(2**(N-1))

for i in range(len(B)-1):
    j=i+1
    B[j]=B[j]/(2**(N-j))

print(sum(B))

Solution (Python):


import sys
import math
import itertools

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

while len(V) != 1:
	V[1] = (V[0]+V[1])/2
	V.pop(0)

print(V[0])


"""

"""

Solution (Python):
N = int(input())
L= list(map(int,input().split()))
L = sorted(L)
ans = L[0]
for x in L:
    ans = (ans + x) / 2
print(ans)

Solution (Python):


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

v.sort()

now_value = 0.0

now_value = v.pop(0)
for i in range(N-1):
    
    now_value +=v[i]
   
    
    now_value = now_value /2.0

print('{:.5f}'.format(now_value))

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

new_value = V.pop(0)

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

print(new_value)

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

a.sort()

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

print(a[len(a)-1])

Solution (Python):
n = int(input())
v = list(map(int,  input().split()))
v = sorted(v)
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 = sorted(v)
ans = (v_sort[0] + v_sort[1]) / 2
for i in range(2, N):
    ans = (ans + v_sort[i]) / 2 
    
print(ans)

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

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

print(v[0])