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