import Control.Applicative

sumdn :: Integer -> Integer -> Integer
sumdn a b = 1 + (floor . logBase 10 . fromIntegral $ a + b)

main :: IO ()
main = do
    putStr =<< 
        (unlines . map show . map (\[a, b] -> sumdn a b) . map (map read) . map words . lines)
            <$> getContents