import sys def check(x): if x < 1 or x > 1000: sys.exit() else: return N = int(input()) check(N) list = input().split(' ') buf = len(list) for i in range(0,buf): check(int(list[i])) if buf != N: sys.exit() list.sort() if buf % 2 == 0: buf = buf // 2 buf = int(list[buf]) + int(list[buf-1]) buf /= 2 else: buf = buf // 2 buf = int(list[buf]) print(buf)