h=int(input()) f=[] for e in range(h): f.append(int(input()) if f%2==0: print((e[f/2]+e[f/2+1])/2) else: print(e[(f+1)/2])