import statistics input() N = map(int, input().split()) M = statistics.median(N) print(int(M)) if float(M).is_integer() == 1 else print(M)