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