-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU n = io.read() t = {} i = 1 for c in io.read():gmatch('%S+') do t[i] = tonumber(c) i = i + 1 end table.sort(t) if n % 2 == 0 then x = n / 2 print((t[x] + t[x + 1]) / 2) else x = math.ceil(n / 2) print(t[x]) end