import Control.Monad

main = do
    all <- getContents
    mapM_ (putStrLn . show) (calc $ words all)
   



calc :: [String] -> [Int]
calc [] = []
calc (n:m:xs) =
    length (show x) : calc xs
    where
        n1 = read n
        m1 = read m
        x = n1 + m1

