n=int(input()) a=input().split() a.sort() if n%2==0: P=int(a[int(n/2-1)])+int(a[int(n/2)]) print(P/2) else: r=len(a)/2+1 print(int(a[f]))