gets
as = gets.split.map(&:to_r).sort

until (n = as.size) == 2
  min = Float::INFINITY
  idx = nil
  (n - 1).times do |i|
    diff = as[i + 1] - as[i]
    if min > diff
      min = diff
      idx = i
    end
  end
  val = Rational(as[idx] + as[idx + 1], 2)
  as = as[0, idx] + [val] + as[idx + 2, n - 2 - idx]
end
puts Rational(as[0] + as[1], 2).to_f