n = int(input())
#入力値を昇順ソートする
numList = sorted(list(map(int, input().split())))

length = len(numList)
if length % 2 == 0:
    #偶数の場合は、中央に近い2値の平均
    mid = (numList[floor(length / 2)] - numList[ceil(length / 2)]) / 2
else:
    #配列の中央の値を取得
    mid = (numList[ceil(length / 2)])
print(mid)