n=input() a=map(int,input().split()) import statistics as m print(m.median(a))