module Main where
import System.IO
import Data.Function
import Control.Monad
main :: IO ()
main = do
     fix $ \loop -> do
       e <- isEOF
       unless e $ do
         a:b:_ <- readInts <$> getLine
         print $ length $ show $ a + b
         loop
     return ()
readInts :: String -> [Int]
readInts = map read . words