import statistics input() A = [int(i) for i in input().split()] print(statistics.median(A))