import statistics as s N=int(input()) A=list(map(int,input().split())) print(s.median(A))