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