i=input i() import statistics as s print(s.median(map(int,i().split())))