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