real::S(6),val
  read *,S
  val = (SUM(S)-MAXVAL(S)-MINVAL(S))/4.0
  if(val.lt.1) then
     print '("0",f0.2)',val
  else
     print '(f0.2)',val
  end if
end