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