import statistics import math N=int(input()) A=list(map(int,input().split())) newA=sorted(A) median=statistics.median(newA) print(median)