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