# 2019/12/28 import statistics n=int(input()) print(statistics.median(list(map(int,input().split()))))