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