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