-- Digit Number
main = getContents >>= putStr . solve
-- main = getContents >>= putStr . unlines . map show . solve

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