def bubble(a):
    for i in range(len(a) - 1):
        for j in range(len(a) - 1 - i):
            if a[j] > a[j+1]:
                t = a[j]
                a[j] = a[j+1]
                a[j+1] = t
    return a

def mid(a):
    a = bubble(a)
    # print(a)
    if len(a) % 2 == 0:
        i1 = int(len(a) / 2)
        i2 = int(len(a) / 2) - 1
        m = (a[i1] + a[i2]) / 2
    else:
        i = int(len(a) / 2)
        m = a[i]
    return int(m)


while True:
    try:
        arr = []
        n = int(input())
        for _ in range(n):
            a = int(input())
            arr.append(a)
        res = mid(arr)
        print(res)
    except:
        break