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