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

vs = sorted(v)

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

print(vs[n-1])

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

listV = sorted(V,reverse = True)
for i in listV:
    c += 1
    ans += i/2**c

ans += listV[-1]/2**c

print(ans)

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

v.sort()

molec = 0
power = 0
for i in range(N):
    if i >= 2:
        power += 1
    molec += (v[i] << power)

denom = 1 << (1 + power)

print(molec / denom)

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

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


V.sort(reverse=True)

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

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

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

A.sort()
res = A[0]
for a in A:
    res = (res + a) / 2

print(res)

Solution (Python):
def main():
    N = int(input())
    v = [int(c) for c in input().split()]
    v = sorted(v)

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

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

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

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

print(ans)

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

l=sorted(l)
av=l[0]

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

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

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

v.sort()

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

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

Solution (Python):
import decimal,math
from collections import Counter,defaultdict
from fractions import gcd
from bisect import bisect_right,bisect_left
decimal.getcontext().prec = 10
N=int(raw_input())

arr=map(int,raw_input().split())
arr=sorted(arr)



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

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

for i in range(n-1):
    v = sorted(v)
    new = (v.pop(0) + v.pop(0)) / 2.
    v.append(new)

print(v[0])

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

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

print(v_sort[n-1])

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

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

print(ans)

Solution (Python):
N = int(raw_input())
V = map(float, raw_input().split())

V.sort()

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

a = 0
b = 0
tmp = 0

for i in range(N - 1):
    a = v.popleft()
    b = v.popleft()
    tmp = (a + b) / 2.0
    v.appendleft(tmp)
print(v[0])

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

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

print(r)

Solution (Python):
import heapq
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)

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

for i in range(N):
	heapq.heappush(myheap, v[i])

for i in range(N - 1):
	a = heapq.heappop(myheap)
	b = heapq.heappop(myheap)
	heapq.heappush(myheap, (a + b) / 2)
	
print(myheap[0])

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

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

print(ans)

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

for _ in range(n-1):
    listv = sorted(listv)
    min1 = listv[0]
    min2 = listv[1]
    listv = listv[1:]
    listv[0] = (min1+min2)/2
    
print(listv[0])

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

v.sort()
vvv = v[0]

for vi in v:
    vvv = (vvv + vi) / 2

print(vvv)

Solution (Python):
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)
import heapq

def main():
    N = int(input())
    V = [int(c) for c in input().split()]
    heap = []
    for i in range(N):
        heapq.heappush(heap, V[i])

    for i in range(N -1 ):
        mini = heapq.heappop(heap)
        mini2 = heapq.heappop(heap)
        mean = (mini + mini2) / 2
        heapq.heappush(heap, mean)
    print(heap[0])



if __name__ == '__main__':
    main()

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

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

s = (Vlis[0]+Vlis[1])/2.0
for i in range(2,N):
	s = (s+Vlis[i]) / 2.0
print(s)

Solution (Python):
def resolve():
    n = int(input())
    vs = list(map(int, input().split()))
    sorted_vs = sorted(vs)

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

    print(sorted_vs[n-1])
resolve()

Solution (Python):
import sys
input = sys.stdin.readline
n = input()
v = list(map(int, input().split()))
v.sort(reverse=True)
u = [vi / 2**(i + 1) for i, vi in enumerate(v)]
u[-1] *= 2
print(sum(u))

Solution (Python):
N=int(input())
vN=list(map(int,input().split()[:N]))

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

Solution (Python):
N = int(input())
vN = sorted([int(x) for x in input().split()],reverse=True)

for n in range(N-1):
  vN[n] = vN[n] / (2 ** (n+1))
vN[-1] = vN[-1] / (2 ** ((N - 1)))
print(sum(vN))

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

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

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

t_list = sorted(t_list)

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

Solution (Python):
import collections
N = int(input())
v = list(map(int, input().split()))
v = collections.deque(sorted(v))
while len(v) > 1:
    x = v.popleft()
    y = v.popleft()
    v.appendleft((x+y)/2)
print(v[0])

Solution (Python):

from math import sqrt
from heapq import heapify, heappop, heappush
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**9)
from fractions import gcd
def inpl(): return list(map(int, input().split()))

N = int(input())
V = inpl()
heapify(V)

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

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

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

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

Solution (Python):

import sys;
import string;
sys.setrecursionlimit(20000) 

import copy
import math
import itertools

from functools import lru_cache


PPP = 1000000007


n = int(input())









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





























import re
import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

def ton(n, k, x):
  s = ""
  while n > 0:
    s = str(n%k) + s
    n //= k
  return s





def getEnergy():
  for y in b:
    yield y

  
  return res

v.sort()
def doit():
  ret = v[0]
  for x in v:
    ret = (ret + x) / 2
  return ret

def yn():
  if doit():
    return "YES"
  else:
    return "NO"




try:
  
  print(doit())
  
except Exception as e:
  print("e", e, file=sys.stderr)

Solution (Python):
import sys,heapq,math,resource
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

def setrlim():
  sys.setrecursionlimit(250000)
  soft,hard = resource.getrlimit(RLIMIT_STACK)
  
  

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

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

Solution (Python):
from sys import stdin,stdout
I = lambda : map(int,stdin.readline().split())
import heapq

n = input()
A = I()
A.sort()
x = A[0]
for i in range(1,n):
	x+=A[i]
	x/=2.0
print x

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

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

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

print(v[0])

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



answer=0.5*(v[0]+v[1])

for i in range(2,N):
 answer=0.5*(answer+v[i])

print(answer)

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
v=sorted(v)
i=0
while True:
    if len(v)!=1:
        v[0]=(v[0]+v[1])/2
        del v[1]
        v=sorted(v)
    else:
        break
print(v[0])

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

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

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())
v=[int(i) for i in input().split()]
v=sorted(v)

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

    v.append(check)
    v=sorted(v)
ans=(v[0]+v[1])/2
print(ans)

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

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

print(a)

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

a.sort()
a_1 = (a[0] + a[1])/2
b = [a_1]

for i in range(2, n):
    b.append((b[-1]+a[i])/2)

print(b[-1])

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

_v = sorted(v, reverse=True)

gu = _v.pop(N-1)
if N == 2:
  print((_v[0]+gu)/2)
else:
  for i in range(N-2,-1,-1):
    gu = (gu + _v.pop(i))/2
  print(gu)

Solution (Python):
import sys


def solve(N: int, v: "List[int]"):
    v = sorted(v)
    for i in range(N-1):
        v[i+1] = (v[i] + v[i+1]) / 2.0
    print(v[N-1])
    return

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

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
li = list(map(int, input().split()))
li.sort()
x = 0

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


print(li[N-1])

Solution (Python):


from functools import reduce


def main():
    
    n = int(input())
    v = map(int, input().split())
    print(process(n, v))


def process(n, v):
    v = sorted(v)
    return reduce((lambda x, y: (x + y) / 2), v)


if __name__ == "__main__":
    main()

Solution (Python):



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

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

    print(V[0])


if __name__ == "__main__":
    main()

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

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

v.sort()

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

print(value)

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

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    N = int(input())
    v = [int(i) for i in input().split()]
    v.sort(reverse=True)
    for i in range(N-1):
        tmp = (v.pop()+v.pop())/2
        v.append(tmp)
        v.sort(reverse=True)
    print(v[0])


if __name__ == '__main__':
    main()

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

v = sorted(v)

def rec(i):
    if i == 0:
        return v[0]
    return (v[i] + rec(i-1))*0.5

print(rec(N-1))

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

V.sort()

i = 2
ans = 0
ans = (V[0] + V[1]) * 0.5
while i < len(V):
    ans = (ans + V[i]) * 0.5
    i += 1

print(ans)

Solution (Python):
from functools import reduce

input()
print(reduce(lambda x, y: (x + y) / 2, sorted(int(x) for x in input().split())))

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

if __name__ == '__main__':
    s = 0.0
    div = 1.0
    for i, vi in enumerate(v):
        if i != len(v) - 1:
            s += vi / (2.0 ** (i+1))
        else:
            s += vi / (2.0 ** i)
    print(s)

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

Solution (Python):
import heapq

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

heapq.heapify(v)
for _ 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 = sorted(map(int, input().split()))
while True:
    if len(v) == 1:
        print(v[0])
        break
    a, b = v.pop(1), v.pop(0)
    v.append((a+b)/2)
    v.sort()

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

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

while len(v) != 1:
    tmp_a = heappop(v)
    tmp_b = heappop(v)
    heappush(v,(tmp_a+tmp_b)/2)

print(v[0])

Solution (Python):
from sys import stdin


def main():
    N = int(stdin.readline().rstrip())
    vs = [int(x) for x in stdin.readline().rstrip().split()]
    vs = sorted(vs)
    for _ in range(N - 1):
        new = (vs[0] + vs[1]) / 2
        vs = vs[2:]
        vs.append(new)
        vs.sort()
    print(vs[0])


if __name__ == '__main__':
    main()

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

Solution (Python):



import sys

input = sys.stdin.readline

def main():
    n = int(input())
    V = list(map(int, input().split()))
    V.sort()
    while True:
        if len(V) == 1:
            break
        a = (V[0] + V[1]) / 2
        V = V[2:]
        V.insert(0, a)
        V.sort()
    print(V[0])

main()

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

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

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

V = sorted(V, reverse=True)

while len(V) > 1:
    a = V.pop()
    b = V.pop()
    V.append((a + b) / 2)

print(V[0])

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

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

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

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

v = sorted(v)

while len(v) != 1:
    s = v.pop(0)
    t = v.pop(0)
    v.append((s+t)/2)
    v = sorted(v)

print(v[0])

Solution (Python):
def main():
    N = int(input())
    V = list(map(int, input().split()))
    
    sort_V = sorted(V)
    ave = (sort_V[0] + sort_V[1]) / 2
    if N > 2:
        for i in range(2, N):
            ave = (ave + sort_V[i]) / 2

    print(ave)

main()

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    v = list(map(float, input().split()))

    v = sorted(v)

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

    print(answer)

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

N = int(input())

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

while len(V) > 1:

    
    a = heappop(V)
    b = heappop(V)

    new = (a + b) / 2
    heappush(V, new)

print(V[0])

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

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

print(ans)

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

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

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

Solution (Python):
"""
 // Author : snape_here - Susanta Mukherjee

"""
from __future__ import division, print_function
import os,sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
else:
    _str = str
    str = lambda x=b"": x if type(x) is bytes else _str(x).encode()

    


from math import ceil,floor,log,sqrt,factorial,pow,pi





def ii(): return int(input())
def fi(): return float(input())
def si(): return input()
def mi(): return map(int,input().split())
def li(): return list(mi())

import math
 
def find_gcd(x, y): 
      
    while(y): 
        x, y = y, x % y 
      
    return x
 
def main():
 
    n=ii()
    v=li()
    v.sort()
    a=v[0]
    for i in range(1,n):
        a+=v[i]
        a/=2
    print(a)
    


BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.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):
        if self.buffer.tell():
            return self.buffer.read()
        return os.read(self._fd, os.fstat(self._fd).st_size)

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

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


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", b" "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", b"\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip(b"\r\n")



if __name__ == "__main__":
    main()

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

v.sort()

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

print(v[0])

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

v = sorted(v)

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

print(x)

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.0

print(ans)

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

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

print("{}".format(a[N-1]))

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

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

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

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

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

vals = V[:]

import heapq

heapq.heapify(vals)


while len(vals) != 1:
    min_1 = heapq.heappop(vals)
    min_2 = heapq.heappop(vals)
    
    heapq.heappush(vals, (min_1+min_2)/2)
    
print(vals[0])

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

V.sort()

tmp = 0.0
for i,v in enumerate(V):
    if i == 0:
        tmp = v
    else:
        tmp = (v + tmp) / 2.0


print(tmp)

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

def main(): 
    N = II()
    v_li = LI()

    v_li.sort()

    ans = 0
    for i, v in enumerate(v_li):
        if i == 0:
            ans += (v / (2**(N-1)))
        else:
            ans += (v / (2**(N-i)))

    print(ans)


main()

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

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

print(v[0])

Solution (Python):
from decimal import *

n = int(raw_input())
a = map(int, raw_input().split())

a.sort()

cur = Decimal(a[0])

for i in xrange(1, n):
	cur = (cur + Decimal(a[i]))/Decimal(2)

print cur

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

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

v.sort()

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

print(v0)

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

ans = 0
for i, v in enumerate(v):
    if i == 0:
        ans += v/(2**(N-1))
        continue
    ans += v/(2**(N-i))
print(ans)

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

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

xs = sorted(xs)

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

print(tmp)

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

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

print(ans)

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

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

while len(vs) > 1:
    a = vs.pop(0)
    b = vs.pop(0)
    r = (a+b)/2
    
    for i, v in enumerate(vs):
        if v > r:
            vs.insert(i, r)
            break
    else:
        vs.append(r)
        
print(vs[0])

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

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

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

print(ans)

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

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

print(ans)

Solution (Python):



import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
v = LI()
v.sort()
if n == 2:
    print(sum(v)/2)
    quit()
ans = (v[0]+v[1])/2
for i in range(2,n):
    x = (ans+v[i])/2
    ans = x
print(ans)

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

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

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 = 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())
l=sorted(list(map(int,input().split())))
a=l[0]
for i in l:
  a=(a+i)/2
print(a)

Solution (Python):


if __name__ == '__main__':
    N = int(input())
    V = list(map(int, input().split()))

    while True:
        V.sort(reverse=True)
        V[-2] = (V[-2]+V[-1])/2
        V = V[:-1]

        if len(V)==1:
            break

    print(V[0])

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



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

print(s)

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

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

print(ans)

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

val2 = sorted(val)
for i in range(len(val2)-1):
    val2[1] = (val2[0]+val2[1])/2
    val2.pop(0)
print(val2[0])

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

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

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

v.sort()

ans = 0.0
vk = 0.0

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

print(ans)

Solution (Python):
inpl = lambda: list(map(int,input().split()))
N = int(input())
V = inpl()
V.sort(reverse=True)
ans = 0
factor = 1
for v in V:
    factor /= 2
    ans += factor*v
ans += factor * v
print(ans)

Solution (Python):
def getlist():
	return list(map(int, input().split()))

N = int(input())
v = getlist()

v = sorted(v)

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

print(val)

Solution (Python):
def main():
    N = int(input())
    V = [int(s) for s in input().split()]
    V.sort()

    sol = (V[0] + V[1]) / 2

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

    print(sol)


if __name__ == '__main__':
    main()

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())
V = [int(i) for i in input().split()]


V.sort()

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

print(result)

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)