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):
from collections import deque
import sys
sys.setrecursionlimit(10**9)
n=int(input())
a=[int(x) for x in input().split()]

v=deque()
for x in sorted(a):
    v.append(x)
def A(l):
    if len(l)==1:
        print(l[0])
    else:
        l.appendleft((l.popleft()+l.popleft())/2)
        A(l)

A(v)

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

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

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

print("{:.5f}".format(total))

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

Solution (Python):

def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n): return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)








n=n0()
v=n1()

v.sort()
ans=0

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

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

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

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

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

tmp = 0

for i in range(n):
    if i == 0:
        tmp = v[i]
    else:
        tmp = (tmp + v[i])/2

print(tmp)

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

V.sort()

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

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

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

v = sorted(v)

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

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

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

v.sort()

while True :
    x = v.pop(0)
    y = v.pop(0)
    z = (x + y) / 2
    v.insert(0, z)

    if len(v) == 1:
        print(z)
        exit()

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

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

Solution (Python):
import sys


def qsort(seq, left, right):
    
    if left == right: return seq
    elif left+1 == right:
        if seq[left]>seq[right]:
            seq[left],seq[right] = seq[right], seq[left]
        return seq
    med = (left+right)//2
    pivot = seq[med] 
    
    cur_l = left
    cur_r = right
    
    while True:
        
        while seq[cur_l] < pivot:
            if cur_l >= cur_r: break
            cur_l += 1
        
        while seq[cur_r] > pivot:
            if cur_r <= cur_l: break
            cur_r -= 1
        
        if (cur_r <= cur_l): break
        
        
        seq [cur_l], seq[cur_r] = seq[cur_r], seq[cur_l]
        cur_l += 1
        cur_r -= 1
    
    cut = -1
    if cur_l == cur_r:
        
        if seq[cur_l] < pivot:
            
            cut = cur_l
        else:
            
            cut = cur_l-1
    elif cur_l == cur_r+1:
        
        cut = cur_r
    
    
    
    
    qsort(seq,left,cut)
    
    qsort(seq,cut+1,right)
    

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

Solution (Python):
import sys


def qsort(seq, left, right):
    
    
    if left == right: 
      return seq
    '''elif left+1 == right:
        if seq[left]>seq[right]:
            seq[left],seq[right] = seq[right], seq[left]
        return seq'''
    med = (left+right)//2
    pivot = seq[med] 
    
    cur_l = left
    cur_r = right
    
    while True:
        
        while seq[cur_l] < pivot:
            if cur_l >= cur_r: break
            cur_l += 1
        
        while seq[cur_r] > pivot:
            if cur_r <= cur_l: break
            cur_r -= 1
        
        if cur_r <= cur_l: 
          break
        
        
        seq [cur_l], seq[cur_r] = seq[cur_r], seq[cur_l]
        cur_l += 1
        cur_r -= 1
    
    cut = -1
    if cur_l == cur_r:
        
        if seq[cur_l] <= pivot:
            
            cut = cur_l
        else:
            
            cut = cur_l-1
    elif cur_l == cur_r+1:
        
        cut = cur_r
    
    
    
    
    qsort(seq,left,cut)
    
    qsort(seq,cut+1,right)
    

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

Solution (Python):
def quick_sort(seq, left, right):
  if left == right:
    return 0
  mid = (left + right)//2
  pivot = seq[mid]
  L = left
  R = right
  while True:
    if seq[L] >= pivot and seq[R] <= pivot:
      seq[L], seq[R] = seq[R], seq[L]
      L += 1
      R -= 1
    elif seq[L] > pivot:
      R -= 1
    elif seq[R] < pivot:
      L += 1
    else:
      L += 1
      R -= 1
    if L >= R:
      break
  quick_sort(seq,left,R)
  quick_sort(seq,L,right)

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

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

Solution (Python):
def quick_sort(seq, left, right):
  if left >= right - 1 and seq[left] <= seq[right]:
    return 0
  mid = (left + right)//2
  pivot = seq[mid]
  L = left
  R = right
  while True:
    if seq[L] >= pivot and seq[R] <= pivot:
      seq[L], seq[R] = seq[R], seq[L]
      L += 1
      R -= 1
    elif seq[L] >= pivot:
      R -= 1
    elif seq[R] <= pivot:
      L += 1
    else:
      L += 1
      R -= 1
    if L >= R:
      break
  '''if L == R:
    if seq[L] >= mid:
      R -= 1'''
  quick_sort(seq,left,R)
  quick_sort(seq,L,right)
  return seq

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

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

ans=v.pop(0)
while len(v):
  ans = (ans + v.pop(0))/2
print(ans)

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


print(v[n-1])

Solution (Python):
n = int(input())
v = [int(i) for i in 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())

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

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

for q in A[2:]:
    a = (a + q) / 2

print(a)

Solution (Python):
N = int(input())
D = sorted([int(i) for i in input().split()])
D = [D[i]*2**max(0,i-1) for i in range(N)]
print(sum(D)/2**(N-1))

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


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


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





N = I()
L = IL()

L.sort()

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

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

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

print(ans)

Solution (Python):
from collections import deque

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

v.sort()

d = deque(v)

for _ in range(N-1):
    tmp1 = d.popleft()
    tmp2 = d.popleft()
    d.appendleft((tmp1+tmp2)/2)

print(d.pop())

Solution (Python):
N = int(input())
aList = list(map(int, input().split()))
aList.sort()
for a in aList:
    if(a == aList[0]):
        result = a
    else:
        result = (result + a) / 2
print (result)

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

v.sort()

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

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

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

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

print(tmp)

Solution (Python):
from functools import reduce

N = int(input())
V = tuple(map(int, input().split(' ')))


def ave(v1, v2):
    return (v1 + v2) / 2


print(reduce(ave, sorted(V)))

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]+V[1])/2
for i in range(2,N):
    ans = (ans+V[i])/2
print(ans)

Solution (Python):
from functools import reduce

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

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

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

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

Solution (Python):

def inp():
    return(int(input()))



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



def instr():
    s = input()
    return(list(s[:len(s)]))



def invr():
    return(map(int, input().split()))


n = inp()

V = inlist()

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

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

v.sort()

res = (v[0] + v[1]) / 2
for i in range(2, n):
    res = (res + v[i]) / 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):
import math
from collections import deque
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): 
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): 
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} 
def bitArr(n):
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): 
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

n = readInt()
v = readInts()

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 = 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 = list(map(int, input().split()))
v.sort(reverse=True)
while len(v) > 1:
  num1 = v.pop()
  num2 = v.pop()
  result = (num1 + num2) / 2
  v.append(result)
  v.sort(reverse=True)
print(v[0])

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

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

Solution (Python):
import sys

n, *lst = map(int, sys.stdin.read().split())
lst.sort()
res = lst[0]
for v in lst[1:]:
  res = (res + v) / 2
print(res)

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

Solution (Python):
N = int(input())
Value = list(map(int, input().split()))
Value.sort()
ans = Value[0]

for i in Value[1:]:
    ans = (ans+i)/2
print(ans)

Solution (Python):
N = int(input())
vs = sorted(list(map(int, input().split())))
while N > 1:
  v = vs.pop(0)
  N -= 1
  
  vs[0] = (v + vs[0])/2

print(vs[0])

Solution (Python):
import sys
from fractions import gcd
N=int(sys.stdin.readline().strip())
A=map(int, sys.stdin.readline().split())
A.sort()

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

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

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

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

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
v=sorted(v)
while True:
    x=v.pop(0)
    y=v.pop(0)
    v.append((x+y)/2)
    v=sorted(v)
    if len(v)==1:
        break
print(*v)

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

cnt = 0
while cnt < N-1:
    v[1] = (v[0]+v[1]) / 2
    del v[0]
    cnt +=1
print(*v)

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

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

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

V.sort()
ans = 0

for count,i in enumerate(V):
  if count == 0 or count == 1:
    ans += i / (2**(N-1))
  else:
    ans += i / (2**(N-count))
else:
  print(ans)

Solution (Python):
input()
v = list(map(int, input().split()))
v.sort()
ans, *v = v
for vi in v:
    ans = (ans + vi) / 2
print(ans)

Solution (Python):
N=int(input())
List = list(map(int, input().split()))
List.sort()
ans=0
i=0
while i<N:
    if i==0:
        pass
        ans=List[i]
    else:
        ans=(List[i]+ans)/2
    i+=1
    
print(ans)

Solution (Python):
n = int(input())
V = sorted(list(map(int, input().split())))
a = V[0]
for i in range(1,n):
    a = (a +  V[i])*0.5

print(a)

Solution (Python):

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


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

print(v[0])

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):
from collections import deque
N=int(input())
v=list(map(int,input().split()))
v.sort()

for i in range(N-1):
    x=(v[0]+v[1])/2
    V=deque(v)
    V.popleft()
    V.popleft()
    V.append(x)
    v=list(V)
    v.sort()
print(v[0])

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

def main():
    N = int(readline())
    V = [int(i) for i in readline().split()]

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


if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
v=sorted(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()))
while len(v) > 1:
    v = sorted(v)
    v = [(v[0] + v[1]) / 2, ] + v[2:]
print(v[0])

Solution (Python):
import itertools
import math
import fractions
import functools
n = int(input())
v = list(map(int, input().split()))
v.sort()

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

print(sum)

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)
for i in range(N-1):
  if(i == 0):
    tmp = v.pop(0)
    tmp2 = v.pop(0)
    ave = (tmp+tmp2)/2
    tmp = tmp2
  else:
    tmp2 = v.pop(0)
    ave = (ave+tmp2)/2
print(str(ave))

Solution (Python):
import itertools

n = int(input())
v = sorted(map(int, input().split()))
num = v[0]

for i in v:
  num = (num + i)/2

print(num)

Solution (Python):
def main():
    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
    return a
print(main())

Solution (Python):
n = input()
m = list(map(int,input().split()))
answer = 0
while len(m) > 1:
  m.sort()
  answer = (m.pop(0)+m.pop(0)) / 2
  m.append(answer)
  
print(m[0])

Solution (Python):

n = int(input())

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

a.sort()

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

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)
    v.sort(reverse=True)
print(v[0])

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def SS(): return map(str,sys.stdin.readline().rstrip().split())
def II(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
v = LI()
v.sort()
ans = v.pop(0)

for i in v:
  ans = (ans+i)/2
print(ans)

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

V.sort()
reg = [V[0]]

for i in range(1, N):
    tmp = (V[i] + reg.pop())/2
    reg.append(tmp)
print(reg.pop())

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

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

Solution (Python):
import sys
import math
import bisect


def main():
    n = int(input())
    A = list(map(int, input().split()))
    A.sort()
    for i in range(1, n):
        A[i] = (A[i] + A[i-1]) / 2
    print('%.10f' % (A[-1]))

if __name__ == "__main__":
    main()

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

v.sort()

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

print(v[0])

Solution (Python):
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)

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

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

Solution (Python):
N=int(input())
v=list(map(int,input().split()))
v=sorted(v,key=int)
def fusion():
    if len(v)==1:
        return v[0]
    else:
        v.insert(0,(v.pop(0)+v.pop(0))/2)
        v.sort(key=float)
        return fusion()
print(fusion())

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

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

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

v = sorted(v)

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

print(res)

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

def main():
    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])

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):
import math
def py():
    print("Yes")
def pn():
    print("No")
def iin():
    x = int(input())
    return x

neko = 0
nya = 0
nuko = 0

n = iin()
a = [int(x) for x in input().split()]
for i in range(n-1):
    a.sort()
    a[i + 1] = (a[i]+a[i + 1])/2
print(a[n-1])

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

material = [v[i]*(2**(i-n)) for i in range(n)]
print(sum(material) + material[0])

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

Vs.sort()

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


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

Solution (Python):


import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))


def resolve():
    N,=pin()
    v=lispin()
    V=[v_*2 for v_ in v]
    V.sort()
    ans=V[0]
    for i in range(1,N):
        ans=(ans+V[i])/2
    print(ans/2)


resolve()

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

v = sorted(v)
v = deque(v)


for i in range(N - 1):
    cal = 0
    cal += v.popleft()
    cal += v.popleft()
    cal = cal / 2
    v.appendleft(cal)

print(v.pop())

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

V = sorted(V)

while True:
    if len(V) == 1:
        break
    new = (V[0]+V[1])/2
    V = V[2:]
    V.append(new)
    V = sorted(V)

print(V[0])

Solution (Python):
n = int(input())
v = sorted(list(map(int, input().split())), reverse=True)
for _ in range(n-1):
    new_v = (v.pop() + v.pop()) / 2
    v.append(new_v)
    v = sorted(v, reverse=True)
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=[]
v+=list(map(int,input().split()))
v.sort()
l=len(v)
result=v[0]/(2**(l-1))
for i in range(1,n):
  result=result+v[i]/(2**(l-i))
print(result)

Solution (Python):
n=int(input())
arr=list(map(int,input().split()))
while len(arr)>1: 
 arr=sorted(arr) 
 v1=arr.pop(0) 
 v2=arr.pop(0)
 arr.append((v1+v2)/2)
print(arr[0])

Solution (Python):
import heapq


def main():
    _ = input()
    A = list(map(int, input().split()))
    heapq.heapify(A)

    while len(A) > 1:
        n1 = heapq.heappop(A)
        n2 = heapq.heappop(A)
        n = (n1 + n2) / 2
        heapq.heappush(A, n)

    print(sum(A))


if __name__ == '__main__':
    main()

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 heapq

def main():
    N = int(input())
    v = list(map(int, input().split()))
    heapq.heapify(v)
    for i in range(N-1):
        x = heapq.heappop(v)
        y = heapq.heappop(v)
        heapq.heappush(v, (x+y)/2)
    ans = heapq.heappop(v)
    print(ans)

if __name__ == "__main__":
    main()

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


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

print(s)