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