n = int(input()) list_str = list(input().split()) list_int = [int(s) for s in list_str] list_int.sort() #print(list_int) if n%2==1: print(list_int[int((n-1)/2)]) else: print((list_int[int(n/2-1)]+list_int[int(n/2)])/2)