_ = input() from statistics import median print(median(sorted([int(i) for i in input().split()])))