s = gets.chomp.split.map(&:to_i) sum = 0 s.each do | i | sum+=i end s = (sum - s.max - s.min).to_f / 4.to_f puts sprintf("%.2f", s)