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 copy

def solve():
    V = copy.copy(v)
    while len(V) > 1:

        V.sort()
        tmp = (V[0]+V[1])/2
        del V[0:2]
        V.append(tmp)
    print(V[0])


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

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

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

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

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0
inf = float("inf")

n = k()
v = l()
v.sort()

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

print(v[0])

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

while len(v) > 1:
    x = v.pop(0)
    y = v.pop(0)
    z = (x+y)/2
    v.append(z)
    v.sort()

print(v[0])

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

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

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

V.sort()
out = V[0]
for i in range(n - 1):
    j = i + 1
    out = (out + V[j]) / 2
print(out)

Solution (Python):
import functools

n = int(input())
V = sorted(map(int, input().split()))
ans = functools.reduce(lambda x, y: (x + y) / 2, V)
print(ans)

Solution (Python):
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()
V = rl()

import heapq

heap = []
for v in V:
	heapq.heappush(heap, v)

while len(heap) >= 2:
	v = heapq.heappop(heap)
	v2 = heapq.heappop(heap)
	nv =(v + v2)/2
	heapq.heappush(heap, nv)
print(heap[0])

Solution (Python):
def main():
    N = int(input())
    V = list(map(int, input().split()))
    while len(V) > 1:
        V.sort()
        new_v = sum(V[0:2]) / 2
        V = V[2:]
        V.append(new_v)
    print(V[0])


if __name__ == '__main__':
    main()

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

v = sorted(v)

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

print(v[0])

Solution (Python):
import heapq


def main():
    n = int(input())
    v = list(map(float, input().split()))
    heapq.heapify(v)
    while True:
        a = heapq.heappop(v)
        if not len(v):
            print(a)
            return
        b = heapq.heappop(v)
        heapq.heappush(v, (a + b) / 2)


if __name__ == '__main__':
    main()

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

Solution (Python):
N = int(input())
V = [int(i) for i in input().split()]
V.sort(reverse=True)
while len(V) != 1:
    a,b = V.pop(), V.pop()
    V.append((a+b)/2)
print(V[0])

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

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

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

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

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

while True:
  ans = 0
  ans += (v[0] + v[1])/2
  if len(v) == 2:
    break
  else:
    v.pop(0)
    v.pop(0)
    v.insert(0, ans)
print(ans)

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

V.sort()
avg=V[0]
for i in range(n):
  avg = (avg +V[i]) /2
  
print(avg)

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

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

ans = (vl[0]+vl[1])/2
if len(vl) == 2:
    print(ans)
    exit()

for v in vl[2:]:
    ans = (ans + v)/2

print(ans)

Solution (Python):
from functools import reduce
N = int(input())
V = sorted(list(map(int, input().split())))
print(reduce(lambda x,y: (x+y)/2, V))

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

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

Solution (Python):
import collections

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

v.sort()

v = collections.deque(v)

ans = v.popleft()

for i in range(n-1):
    a = v.popleft()
    ans = (ans + a)/2

print(ans)

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

V_Asc = sorted(V)

ans = 0 
for v in V_Asc:
    ans = (ans + v )/2 if ans != 0 else v
    last = v

print(ans)

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

for i in range(N - 1):
    v1 = v.pop(0)
    v2 = v.pop(0)
    v.append((v1 + v2) / 2)
    v.sort()
print(v[0])

Solution (Python):
def resolve():
    '''
    code here
    '''
    N = int(input())
    As = [int(item) for item in input().split()]

    As.sort()

    res = As[0]
    for i in As[1:]:
        res = (res + i)/2
    print(res)
if __name__ == "__main__":
    resolve()

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

Solution (Python):
from math import gcd
n=int(input())
v=list(map(int,input().split()))
v.sort()
ans=v[0]/(2**(n-1))
div=2**n
for i in range(1,n):
    div/=2
    ans+=v[i]/div

print(ans)

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

Solution (Python):
_,l=open(0)
p,*v=sorted(map(int,l.split()))
for x in v:p=(p+x)/2
print(p)

Solution (Python):
input()
p,*v=sorted(map(int,input().split()))
for x in v:p=(p+x)/2
print(p)

Solution (Python):
input()
p,*v = sorted(list(map(int,input().split())))
for x in v:p=(p+x)/2
print(p)

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

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

Solution (Python):

import heapq
n = int(input())
v = list(map(int,input().split()))
heapq.heapify(v)
x = 0
while v:
  x = heapq.heappop(v)
  if not v:
    break
  y = heapq.heappop(v)
  heapq.heappush(v,(x+y)/2)
print(x)

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

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

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

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

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

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

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

V.sort()
sum = 0
for i,v in enumerate(V):
    if i == 0:
        sum += v
    sum = float((sum + v) / 2)

print(sum)

Solution (Python):
from fractions import Fraction

n, *xx = map(Fraction, open(0).read().split())

a, b, *xx = sorted(xx)

ans = (a+b)/2

for x in xx:
    ans = (ans+x)/2

print(float(ans))

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

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

v.sort(reverse = True)

while len(v) > 1 :
    v.append((v.pop(-1) + v.pop(-1))/2)
    v.sort(reverse = True)

print(v[0])

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

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

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

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

while len(V)>=2:
    a=heappop(V)
    b=heappop(V)
    heappush(V,(a+b)/2)

c=heappop(V)
print(c)

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 = (v[0]+v[1])/2
for x in v[2:]:
    ans = (ans+x)/2
print(ans)

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

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

print(v[0])

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

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

print(ans)

Solution (Python):
n = int(input())
v_li = [int(w) for w in input().split()]

v_li.sort()

ans = v_li[0]
for i in v_li[1:]:
    ans = (ans + i) / 2
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):
N = int(input())
v = list(map(int, input().split()))
v.sort()
a = v[0]
for i in range(1, len(v)):
    a = (a + v[i])/2
print(a)

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

v.sort()
for i in range(N-1):
  v[1] = (v[0]+v[1]) / 2
  v.pop(0)
  
print(sum(v))

Solution (Python):









import sys
input = sys.stdin.readline

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

n = 0.0
while len(list_V) >= 2:
    list_V.sort()
    n = (list_V[0] + list_V[1])/2
    list_V.append(n)
    list_V.pop(0)
    list_V.pop(0)

print(list_V[0])

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

def main():
    n = int(input())
    v = sorted(list(map(int, input().split())))
    for _ in range(n-1):
        v.append((v.pop(0) + v.pop(0)) / 2)
        v.sort()
    print(*v)

if __name__ == '__main__':
    main()

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

print( int(value) if value%1==0 else value)

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

for _ in range(n-1):
    x = v[0]
    y = v[1]
    num = (x+y)/2
    del v[0]
    v[0] = num

print(v[0])

Solution (Python):
N = int(input())
V = sorted([int(x) for x in input().split()])
Fus = (V[0]+V[1])/2
for T in range(2,N):
    Fus = (Fus+V[T])/2
print(Fus)

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

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

print(ans)

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

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

print(*v)

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

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

print(*v)

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

Solution (Python):
n = int(input())
v =list(map(int, input().split()))
v.sort()
a = v[0]
for i in range(1, n):
    a = (a+v[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()

a = v[0]

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


print(a)

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

v.sort()

a = (v[0]+v[1])/2

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


print(a)

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

vn.sort()

a = (vn[0]+vn[1])*0.5

for i in range(2, n):
    a = (a+vn[i])*0.5


print(a)

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

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

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

A.sort(reverse = True)

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

print(A[0])

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n, *v = map(int, read().split())

v = sorted(v)
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()

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

Solution (Python):









import os
import sys




def main():
    n = int(input())
    v = list(map(int, input().split()))
    v.sort(reverse=True)
    while len(v) != 1:
        s = v.pop()
        t = v.pop()
        v.append((s+t)/2)
    print(v[0])


if __name__ == "__main__":
    main()

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

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

for _ in range(N-1):
    x = V.pop()
    y = V.pop()
    V.append((x + y) / 2)
    V.sort(reverse=True)
print(*V)

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

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
a=[0]*n
for i in range(n):
    t=0
    for j in range(n):
        if v[i]>v[j]:
            t+=1
    a[t]=v[i]
for i in range(n):
    if a[i]==0:
        a[i]=a[i-1]
m=0
for i in range(1,n):
    m+=a[i]/(2**(n-i))
print(m+(a[0]/(2**(n-1))))

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, *V = map(int, read().split())

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

    print(ans)
    return


if __name__ == '__main__':
    main()

Solution (Python):

def main():
    n = int(input())
    v = list(map(int, input().split()))
    v.sort()

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

if __name__ ==  "__main__":
    main()

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

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

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

print(v[0])

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

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

Solution (Python):
_,l=open(0)
l=sorted(map(int,l.split()))
v=l[0]
for i in l: v=(v+i)/2
print(v)

Solution (Python):
input()
l=sorted(map(int,input().split()))
v=l[0]
for i in l: v=(v+i)/2
print(v)

Solution (Python):
n,*l=map(int,open(0).read().split())
l.sort()
v=sum(l[:2])
for i in range(2,n): v=v/2+l[i]
print(v/2)

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

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

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

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

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

v.sort()
ans = v[0]
for i in range(n):
    ans = (ans + v[i]) / 2

print(ans)

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

v.sort()

total = 0
for i in range(N):
    if i == 0:
        total +=v[i] * 1/(2**(N-i-1))
    else:
        total +=v[i] * 1/(2**(N-i))

print(total)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
from collections import deque
n = int(input())
v = list(map(int,input().split()))
v.sort(reverse=True)
stack = deque()
for i in v:
    stack.append(i)
while stack:
    if len(stack) == 1:
        print(stack.pop())
    else:
        small1 = stack.pop()
        small2 = stack.pop()
        tmp = (small1 + small2)/2
        stack.append(tmp)

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

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

print(heapq.heappop(S))

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

ans=v.pop()
for i in range(n-1):
  tt=v.pop()
  ans=(ans+tt)/2
print(ans)

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

print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
Vs = list(mapint())
Vs.sort()
x = Vs[0]
for v in Vs[1:]:
    x = (x+v)/2
print(x)

Solution (Python):

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

vl.sort()


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

print(tmp)

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

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

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

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

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

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

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

print(ave)

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

    w = v_s[0]
    for i in range(1, n):
        w = (w + v_s[i])/2
    print(w)
    
if __name__ == '__main__':
    main()

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

V.sort()
ans=(V[0]+V[1])/2
i=2
while i<N:
    ans=(ans+V[i])/2
    i+=1

print(ans)

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

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

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

Solution (Python):




from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""













if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip



"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""




def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod

    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)

def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): 
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def check_sorted(a):
    ''' returns True/False '''
    for i in range(len(a)-1):
        if a[i]>a[i+1]:
            return False
    return True
def ceil(n, k=1): return n // k + (n % k != 0) 
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) 
def mi(): return map(int, input().split()) 
def li(): return list(map(int, input().split())) 
def lw(): return input().split() 
def lcm(a, b): return abs(a * b) // gcd(a, b) 
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) 
def dd(): return defaultdict(int) 
def ddl(): return defaultdict(list) 
def write(s): return sys.stdout.write(s)













def main():
    
    n=ii()
    v=li()
    v.sort()
    answer=v[0]
    for i in range(1,n):
        answer+=v[i]
        answer/=2
    print(answer)





















    
""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""

py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

import os, sys
from io import IOBase, BytesIO

BUFSIZE = 8192

class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)


class IOWrapper(IOBase):

    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')



""" main function"""

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
ans=0.0
temp=0
for _ in range(n):
    for i in range(n-1):
        if v[i]>v[i+1]:
            temp=v[i]
            v[i]=v[i+1]
            v[i+1]=temp

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

print(v[n-1])

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

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

vn = [int(i) for i in input().split()]
heapq.heapify(vn)

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

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

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

print(v[0])

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

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

v.sort()

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

print(v[0])

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