s=$<.read.split.map &:to_f;printf "%.2f\n",(s.reduce(:+)-s.max-s.min)/4