import numpy as np n = int(input()) A = list(map(int, input().split())) A = np.array(A) print(np.median(A))