import Data.Char (isDigit)

nondigit2space :: String -> String
nondigit2space s = map nondigit2space' s
    where
        nondigit2space' c
            | isDigit c = c
            | otherwise = ' '

main :: IO ()
main = putStrLn . show . sum . map read . words . nondigit2space =<< getContents