-- Digit Number
import Data.List  -- intercalate

main = getContents >>= putStrLn . unlines . map show . solve

solve :: String -> [Int]
solve = map (length . show . sum . map read) . map words . lines