def find(s):
    k = []
    for i in range(len(s)):
        for j in range(len(s)):
            if(i!=j):
                k.append([abs(s[i]-s[j]),s[i],s[j],(s[i]+s[j])/2])
    #print(k)
    f = min(k)
    l = [i for i in k if i[0]==f[0]]
    f = [-1,-1,-1,-1]
    for i in l:
        if(i[3]>f[3]): f = i
    return f
    
n = int(input())
s = list(map(int,input().split()))
i2 = 1
while(i2<n):
    cur = find(s)
    #print(s)
    s = [i for i in s if i!=cur[1] and i!=cur[2]]
    s.append(cur[3])
    i2+=1
print(s[0])    
    
            