from statistics import median as m i=input i() print(m(list(map(int,i().split()))))