import Data.Char (digitToInt, isDigit) import qualified Data.ByteString.Char8 as BSC8 main :: IO () main = BSC8.getLine >>= print . BSC8.foldl' (\acc x -> acc + digitToInt x) 0 . BSC8.filter isDigit