import Data.List
import Data.Char
import Data.Functor
import qualified Data.ByteString.Char8 as B

main :: IO()
main = do
  xs <- getInts
  f xs

f :: [Int] -> IO()
f [] = return()
f (x:y:xs) = do
  putStrLn . show $ length $ show (x+y)
  f xs

getInts :: IO[Int]
getInts = unfoldr (B.readInt . B.dropWhile isSpace) <$> B.getContents