import statistics N = input() A = list(map(int, input().split())) print(statistics.median(A))