solve :: [Int] -> [Int]
solve x
  | x == [] = []
  | otherwise =	(length $ show $ (x !! 0) + (x !! 1)) : solve (drop 2 x)

main = getContents >>= mapM_ print . solve . map (read :: String -> Int) . words