import Data.Char (digitToInt) charToInt :: Char -> Int charToInt '0' = 10 charToInt x = digitToInt x computeScore :: String -> Int computeScore = sum . fmap charToInt main :: IO () main = getLine >>= print . computeScore