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