import statistics,math s=int(input()) s2=[int(i) for i in input().split()] print(statistics.median(s2))