import Data.Char

main = getContents >>= putStrLn.show.sum.findNums

findNums :: String -> [Int]
findNums str = case num of
                    "" -> []
                    otherwise -> read num : findNums rest
  where prenum = dropWhile (not.isDigit) str
        (num,rest) = span isDigit prenum