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