import statistics _ = input() A = sorted(map(int, input().split())) print(statistics.median(A))