a=gets.split(/\s/).map(&:to_i)
a=a.sort{|x,y|x<=>y}.slice(1,a.size-2)
p=a.reduce(:+)/a.size.to_f
puts "%#.2f" % p