import Prelude import Data.Char (digitToInt) main :: IO () main = getLine >>= print . calc calc :: String -> Int calc = sum . map digitToInt . filter (flip elem ['0'..'9'])