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