local N = io.read("*n") local A = {} for i=1, N do A[i] = io.read("*n") end table.sort(A) if #A % 2 == 0 then print((A[N / 2] + A[N / 2 + 1]) / 2) else print(A[math.ceil(N / 2)]) end