main = interact proc

proc :: String -> String
proc = unlines . map step . lines
    
step :: String -> String
step line = show $ calcDigitNumber (a+b)
    where
    a = read (ws !! 0) :: Int
    b = read (ws !! 1) :: Int
    ws = words line

calcDigitNumber :: Int -> Int
calcDigitNumber n
    | n < 10 = 1
    | otherwise = 1 + calcDigitNumber (n `div` 10)