#中央値を求めよ N = int(input()) A = input().split(" " ) A = list(map(int,A)) A.sort() if N % 2 == 0: k = int(N/2) print((int(A[k]) + int(A[k-1])) / 2) else: print(A[int((N-1) / 2)])