N=input() A=input().split() for i in range(int(N)): min=A[i] min_number=i flag=True for j in range(i+1,int(N)): if min>A[j]: min=A[j] min_number=j flag=False if flag==True: break work=A[i] A[i]=A[min_number] A[min_number]=work if int(N)%2!=0: print(A[int(N)//2]) else: print("{0}".format((int(A[int(N)//2-1])+int(A[int(N)//2]))/2))