n = gets.chomp("").to_i

v = gets.split(" ").map(&:to_i)

sum = 0
v.sort!
(n-1).times do |i|
  if i == 0
    sum += Rational(v[i]+v[i+1], 2)
  else
    sum = Rational(sum+v[i+1], 2)
  end
end

puts sum.to_f
