import statistics as s _=input() print(s.median([int(i) for i in input().split()]))