a = int(input()) l = input().split() l.sort() if a % 2 == 0: print ((int(l[int(a/2 - 1)]) + int(l[int(a/2)]))/2) if a % 2 == 1: print (l[int((a-1)/2)])