main = do
  contents <- getContents
  let
    ls = filter (\l -> l /= []) $ lines contents
    abs = [map read $ words l :: [Int] | l <- ls]
    digits = map (\[a, b] -> length $ show (a + b)) $ abs
  mapM_ print digits