import math from collections import Counter # 標準入力から一行分を読み出し、文字列として格納する。 num = input() first = input() #リストに入れて1文字ずつに分割する #L = list(first) # 読み込んだ文字列をスペースで分割する split_first = first.split() #リストに入れる L = list(map(int,split_first)) numA = int(num) # それぞれをint型に変換する #A = int(split_first[0]) #B = int(split_first[1]) #文字列か数字かを区別する #str.isdigit() #リストのソートを実施する L.sort() #リストが何番目か? #counter = Counter(L) #len(L)でリストの要素数 #リストの個数が奇数だったら真ん中の値を中央値として出力する if numA % 2 == 1: A = math.floor(numA / 2) B = L[A] else: A = math.floor(numA /2) -1 B = (L[A] + L[A+1])/2 print(B)