digitNum [a, b] = length (show (a + b))

main = do s <- getContents
          putStr . unlines . map eachline . lines $ s
  where
          eachline = show . digitNum . map read . words
                   -- "2" <- 2 <- [5,7] <- ["5","7"] <- "5 7"