import math n = int(input()) a = [int(i) for i in input().split(' ')] a.sort() h = int(math.floor(n/2)) if n % 2 == 0: print(int((a[h] + a[h-1])/2)) else: print(a[h])