import System.IO

main :: IO ()
main = do
    end <- isEOF
    if end
    then return ()
    else do
        line <- getLine
        let [x, y] = map read . words $ line
            in putStrLn $ show . length . show $ x + y
        main