module Main where import Data.Char main :: IO () main = interact sumdigit sumdigit :: String -> String sumdigit = show . sum . map toInt toInt :: Char -> Int toInt c | isDigit c = digitToInt c | otherwise = 0