import numpy as np N=int(input()) A=[int(i) for i in input().split()] a=np.median(A) print(a)