from statistics import median N = int(input()) A = [int(input()) for _ in range(N)] m = median(A) print(m)