import Data.Char (isDigit, digitToInt) charToNum :: Char -> Int charToNum c | isDigit c = digitToInt c | otherwise = 0 sumDigits :: String -> Int sumDigits = sum . map charToNum main :: IO () main = getLine >>= print . sumDigits