n=int(input()) s=input() a=list(map(int,s.split())) a.sort() print(a) if n%2!=0: ans=a[n//2] else: ans=(a[n//2]+a[n//2-1])/2 print(int(ans))