-- Try yukicoder -- author: Leonardone @ NEETSDKASU import Data.List (sort) import Text.Printf main = putStrLn . f . show . (/ 4) . sum . take 4 . tail . sort . map read . words =<< getLine where f x = a ++ c where (a, b) = span (/= '.') x c = take 3 $ b ++ "00"