import Data.Char import Data.List main :: IO () main = do str <- getLine print $ foldl' (\sm x -> if isDigit x then sm + digitToInt x else sm) 0 str