from sys import stdin

N = int(stdin.readline().rstrip())
v_lst = [int(v) for v in stdin.readline().rstrip().split()]
v_lst.sort()

while(len(v_lst) > 1):
  v0 = v_lst.pop(0)
  v1 = v_lst.pop(0)
  vn = (v0 + v1) / 2
  v_lst.append(vn)
  v_lst.sort()
  
print(int(v_lst[0]))