_ = input() import statistics print(statistics.median(list(map(int, input().split()))))