import           Data.Char

solve :: String -> Int
solve = g . foldl f (0, 0)
  where f (a, b) c
          | isNumber c = (a, b * 10 + ord c - 0x30)
          | otherwise  = (a + b, 0)
        g (a, b) = a + b

main :: IO ()
main = getContents >>= print . solve