from array import array
N = int(input())
A = array('d', [float(input()) for _ in range(N)])
S = sum(A) / N
i = 0
while i < len(A):
if A[i] > S:
A.pop(i)
else:
i += 1
print(S)
print(*A)47.175 14.6 24.0 29.5 26.0 10.2 40.6