import numpy as np n = int(input()) arr = map(int,raw_input().split()) print np.median(arr)