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