from statistics import median input() print(median([int(x) for x in input().split(' ')]))