import numpy as np num = int(input()) data = np.array([int(x) for x in input().split(" ")]) print(np.median(data))