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