n = gets.chomp.to_i
v = gets.chomp.split.map(&:to_i)
 
ary = []
 
n.times do |i|
  ary.push(v[i])
end
arysort = ary.sort
 
(n-1).times do |i|
  sorezore_wa = (arysort[0] + arysort[1]).quo(2).to_f
  arysort.unshift(sorezore_wa)
 
  arysort.delete_at(1)
  arysort.delete_at(1)
end
 
p arysort[0]