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