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