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

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