import Data.Char

solve :: String->Int
solve [] = 0
solve (x:xs)
    | isDigit x = num + (solve xs')
    | otherwise = solve xs
        where digits = takeWhile isDigit (x:xs)
              num = read digits :: Int
              xs' = drop (length digits) (x:xs)
main = do
    ss <- getContents
    print $ solve ss