import Control.Applicative main = do [l,m,n] <- map read . lines <$> getContents let s = l*100+m*25+n print $ s`div`100`mod`10 + s`div`25`mod`4 + s`mod`25