import numpy N = int(raw_input()) A = sorted(map(int, raw_input().split())) print numpy.median(A)