import Control.Applicative import Control.Monad import Data.List f l m n = s + t + u where x = 100 * l + 25 * m + n (_, y) = divMod x 1000 (s, z) = divMod y 100 (t, u) = divMod z 25 main = f <$> readLn <*> readLn <*> readLn >>= print