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