from statistics import median while True: try: print(int(median([int(input()) for _ in range(int(input()))]))) except: break