import statistics n=input() num=list(map(int,input().split())) print(statistics.median(num))