N = int(input()) B = input().split() B = list(B) A = [] for x in range(N): A.append(int(B[x])) for i in range(N): min_num = A[i] for j in range(i+1, N): if min_num > A[j]: min_num = A[j] num = j if min_num != A[i]: A[num] = A[i] A[i] = min_num print(A) if N % 2 == 0: n = N // 2 print((A[n] + A[n-1]) / 2) else: n = N // 2 print(A[n])