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

print(t)

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

v = sorted(v, reverse = False)
def average(x,y):
    XY = (x + y) / 2
    return XY

gen = v[0]
for i in range(1,N):
    gen = average(gen ,v[i])

print(gen)

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

Solution (Python):
from collections import deque
N = int(input())
v = list(map(int, input().split()))

v.sort()
q = deque(v)
for i in range(N-1):
    x, y = q.popleft(), q.popleft()
    q.appendleft((x + y) / 2)
print(q.pop())

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

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

Solution (Python):
N=int(input())
List = list(map(int, input().split()))
List.sort()
for i in range(N-1):
  res = (List.pop(0)+List.pop(0))/2
  List.append(res)
  List.sort()
print(res)

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]) / 2
    
print(ans)

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

v = sorted(v)

while len(v) != 1:
    a = v.pop(0)
    b = v.pop(0)
    avg = (a+b)/2
    
    v.append(avg)
    v = sorted(v)

print(v[0])

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(key=int)
for i in range(n-1):
  z=(v[i]+v[i+1])/2
  v[i]=z
  v[i+1]=z
print(v[n-1])

Solution (Python):
import math

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

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

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())
m = sorted(list(map(int,input().split())))
if len(m) == 2:
    print(sum(m) / 2)
    exit()

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

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

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

Solution (Python):
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools
from collections import Counter

def main():
    n = int(input())
    v = list(map(int, input().split()))
    v.sort()
    while len(v)>1:
        a = v[0]
        b = v[1]
        c = (a+b)/2
        v.pop(0)
        v.pop(0)
        v.insert(0, c)
    print(v[0])


if __name__=="__main__":
    main()

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

for i in range(N-1):
    x = min(v)
    v.remove(x)
    y = min(v)
    v.remove(y)
    z = (x+y)/2
    v.append(z)
    

print(v[-1])

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

Solution (Python):
import math


def resolve():
    import sys
    input = sys.stdin.readline
    
    n = int(input().rstrip())
    v_list = [int(x) for x in input().rstrip().split(" ")]

    v_list.sort()

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

    print(ans)



if __name__ == "__main__":
    resolve()

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

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

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

print(v[N-1])

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

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

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


solve()

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

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

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

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

from bisect import insort
c=1
while c<N:
    insort(v,(v.pop(0) + v.pop(0)) / 2)
    c+=1
print(*v)

Solution (Python):
input()
(*v,) = sorted(map(int, input().split()), reverse=True)
v[-1] *= 2
print(sum((a / (2 ** i)) for i, a in enumerate(v, start=1)))

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

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

print(v[0])

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
from collections import defaultdict as D
from functools import reduce
import numpy as np
import sys
import os
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


N = I()
v = LI()

v.sort(reverse=True)

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

print(ans)

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

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

Solution (Python):
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instr = lambda: sys.stdin.readline()
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
V = inintl()

V = sorted(V)

now = 0

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

print(now)

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):
n=int(input())
a=[int(i) for i in input().split()]
a=sorted(a)
while(len(a)>1):
    d=(a[0]+a[1])/2
    a[0]=d
    a.pop(1)
    if(len(a)==1):
        break
print(a[0])

Solution (Python):
def solve():
  N = int(input())
  V = list(map(int, input().split()))
  V.sort(reverse=True)
  for _ in range(N-1):
    V[-2] = (V[-1]+V[-2])/2
    V.pop(-1)
  ans = V[0]
  return ans
print(solve())

Solution (Python):
def solve():
  N = int(input())
  V = list(map(int, input().split()))
  V.sort(reverse=True)
  for _ in range(N-1):
    V[-2] = (V[-1]+V[-2])/2
    V.pop(-1)
  ans = sum(V)
  return ans
print(solve())

Solution (Python):
def solve():
  N = int(input())
  V = list(map(int, input().split()))
  ans = 0
  V.sort(reverse=True)
  for i in range(N-1):
    ans += V[i]/pow(2,i+1)
  ans += V[-1]/pow(2,N-1)
  return ans
print(solve())

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

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

print(ans)

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

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

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

t = 0
num = 0
v.sort()
for i in range(n):
    if i == 0:
        num += v[0]
    else:
        t = v[i]
        num = (num+t)/2

print(num)

Solution (Python):

N = int(input())
N_List = sorted(list(map(int,input().split())))
for i in range(N-1):
    Current_N = (N_List[0]+N_List[1])/2
    del N_List[0:2]
    N_List.insert(0,Current_N)

     
print(N_List[0])

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[N-1])

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

v.sort()
ans = 0

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

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

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

Solution (Python):

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

X.sort()
ans = X[0] + X[1]
for i in range(2, N):
    ans += X[i] * 2 ** (i - 1)

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

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

while len(v) > 1:
    v.sort()
    t1 = v.pop(0)
    t2 = v.pop(0)

    v.append((t1 + t2) / 2)

print(v[0])

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

Solution (Python):
from decimal import *

N, *V = map(Decimal, open(0).read().split())
V.sort(reverse=True)

while True:
    if len(V) == 1:
        break
    x = V.pop()
    y = V.pop()
    V.append((x + y) / Decimal(2))
print(V[0])

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

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

print(tmp)

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

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

print(a)

Solution (Python):
from functools import reduce
N = int(input())
v = sorted([int(i) for i in input().split()])
print(reduce(lambda a, b:(a+b)/2, v))

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

from functools import reduce

def mean_material(a, b):
    return (a+b)/2

n = int(input())
l_v = sorted(list(map(int, input().split())))

print(reduce(mean_material, l_v))

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

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

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

Solution (Python):
import numpy as np
n = int(input())
V = list(map(float, input().split()))

V = np.array(sorted(V))
for i in range(1, n):
  V[:i+1] = V[:i+1] /2
print(np.sum(V))

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

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
A.sort()
for _ in range(N-1):
    t=(A.pop(0)+A.pop(0))/2
    A.insert(0,t)
print(*A)

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

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

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

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

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

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

Solution (Python):





























































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    N = int(lines[0])
    
    values = list(map(int, lines[1].split()))
    
    
    
    
    
    
    

    values.sort()

    ave = min(values)
    log(f'ave=[{ave}]')

    for n in range(1, N):
        ave = (ave + values[n]) / 2
        log(f'ave=[{ave}]')

    return [ave]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2', '3 4']
        lines_export = [3.5]
    if pattern == 2:
        lines_input = ['3', '500 300 200']
        lines_export = [375]
    if pattern == 3:
        lines_input = ['5', '138 138 138 138 138']
        lines_export = [138]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
vn = [int(num) for num in input().split()]

while(len(vn) >= 2):
  vn.sort()
  f = vn.pop(0)
  s = vn.pop(0)
  vn.append((f+s)/2.0)

print(vn[0])

Solution (Python):
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

n=int(input())
v=lnii()
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()

value = v[0]

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

print(value)

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

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

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, *V, = map(int, open(0).read().split())

V.sort(reverse=True)

while True:
    if len(V) == 1:
        break
    V.append((V.pop() + V.pop()) / 2)

print(V[0])

Solution (Python):
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

if __name__=='__main__':
    n = I()
    v = list(IL())
    v.sort(reverse=True)
    while 1<len(v):
        tmp = v.pop()+v.pop()
        v.append(tmp/2)
        v.sort(reverse=True)
    print(v.pop())
    exit()

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

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

while len(v) != 1:
    x = v.popleft()
    y = v.popleft()
    v.appendleft((x+y)/2)
print(v[0])

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

print(val)

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

Solution (Python):
import heapq
N=int(input())
v=list(map(int,input().split()))
heapq.heapify(v)
for x in range(N-1):
  t1=heapq.heappop(v)
  t2=heapq.heappop(v)
  heapq.heappush(v,(t1+t2)/2)
print(heapq.heappop(v))

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

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

for _ in range(N - 1):
    v.append((v.pop(-1) + v.pop(-1)) / 2)

print(v[0])

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

Solution (Python):
N = int(input())
T = list(map(int,input().split()))
S = 0
for i in range(len(T)):
    list.sort(T, reverse=False)
    S = (T[0]+T[1])/2
    T.append(S)    
    T.pop(0)
    T.pop(0)
    
    if len(T) ==1:break
print(T[0])

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

newv = sorted(v)

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

print(newv[n-1])

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

def readinput():
    n=int(input())
    v=list(map(int,input().split()))
    return n,v

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

if __name__=='__main__':
    n,v=readinput()
    ans=main(n,v)
    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())
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())
ls = list(map(int,input().split()))
ls.sort()
ave = ls[0]
for i in ls:
    ave = (ave + i)/2
print(ave)

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

v = sorted(v,reverse=True)

for i in range(N-1):
  a = v.pop()
  b = v.pop()
  v.append((a+b)/2)

print(v[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):
from heapq import heapify, heappop, heappush
N = int(input())
vvv = list(map(int, input().split()))
heapify(vvv)
for _ in range(N - 1):
    x = heappop(vvv)
    y = heappop(vvv)
    heappush(vvv, (x + y)/2)
print(vvv[0])

Solution (Python):
import heapq
N = int(input())
Nlist = list(map(int, input().split()))
heapq.heapify(Nlist)
for _ in range(N-1):
    x = heapq.heappop(Nlist)
    y = heapq.heappop(Nlist)
    z = (x+y)/2
    heapq.heappush(Nlist, z)

print(Nlist[0])

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

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
A.sort()
for _ in range(N-1):
    t=(A.pop(0)+A.pop(0))/2
    A.insert(0,t)
print(*A)

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

value=vn[0]

for i in range(1,N):
    tempV=(value+vn[i])/2
    value=tempV

print(value)

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):
N = int(input())
v = sorted(list(map(int, input().split())))
while len(v) > 1:
    temp1 = v.pop(0)
    temp2 = v.pop(0)
    temp = (temp1 + temp2) / 2
    v = sorted([temp] + v)
print(v[0])

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

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

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

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

ans = v[0]

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

print(ans)

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

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

F.sort()

ans = F[0]
for i in range(1,N):
    ans = (ans+F[i])/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):
def resolve():
    
    N=int(input())
    V=list(map(int,input().split()))
    V.sort()

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

    print(tmp)        


resolve()

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

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()
value = V[0]

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

print(value)

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

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

a = sorted(a)
ans = []
for i in range(n-1):
  if i ==0:
    ans.append((a[i]+a[i+1])/2)
  else:
    ans.append((ans[i-1]+a[i+1])/2)
print(ans[n-2])

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

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

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

v.sort()

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

print(ans)

Solution (Python):







__giturl__ = "$URL$"


from collections import defaultdict
from collections import deque
from collections import OrderedDict
import itertools
from sys import stdin
input = stdin.readline


def main():
  N = int(input())
  A = sorted(list(map(int, input().split())))

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


if(__name__ == '__main__'):
  main()

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):
def main():
    n = int(input())
    vlis = list(map(int, input().split()))
    vlis.sort()
    mae = vlis[0]
    for i in range(1, n):
        ato = vlis[i]
        heikin = (mae + ato) / 2
        mae = heikin
    print(heikin)
    
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 = list(map(int,input().split()))
v.sort()
p = v[0]

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

print(p)

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

v.sort()

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

print(result)

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

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
V.sort()
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()

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

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

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

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

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

print(ans)

Solution (Python):










import sys

def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]

def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))

sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1

INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)


N = iIn()
V = iInLH()

V.sort()

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

Solution (Python):
import sys



from collections import deque




def input():
    return sys.stdin.readline().rstrip()


def main():
    N =int(input())
    V =list(map(int,input().split()))
    V.sort()
    sum =V[0]
    for i in range(1,N):
        sum = sum/2 +V[i]/2
    print(sum)



if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
ans = min(v)
v.remove(min(v))
for i in range(N-1):
    ans = (ans + min(v)) /2
    v.remove(min(v))

print(ans)

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

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

Solution (Python):

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

V.sort()

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

Solution (Python):
def resolve():
    N = int(input())
    V = list(map(int, input().split()))
    import itertools
    ans = 0
    for i in range(N-1):
        V = sorted(V, reverse=True)
        v1 = V.pop()
        v2 = V.pop()
        V.append((v1+v2)/2)
    print(V[0])
    


    
if '__main__' == __name__:
    resolve()

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

Solution (Python):
from collections import deque
n = int(input())
v = sorted(map(float, input().split()))
ans = 0
v = deque(v)
while(len(v) > 1):
    v.appendleft(((v.popleft() + v.popleft()) / 2))
print(v[0])

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

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

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

ans=sum(v)

print(ans)

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

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

Solution (Python):
import sys
n = int(input())
v = list(map(int,input().split()))
v.sort()
ans,tmp = [],[]
gab = (v[0]+v[1])/2
tmp.append(gab)
j = 0
if n == 2:
  print(tmp[0])
  sys.exit()
for i in range(2,n):
  tmp.append((v[i] +tmp[j])/2)
  j += 1
print(tmp[-1])

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

ans = (v[0]+v[1])/2
if N>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()
result = V[0]
for n in range(1,N):
    result = (result + V[n]) / 2

print(result)