import Control.Monad
import Data.List

main = do
  s <- getContents
  mapM_ print $ map (log10 . sum) $ map ((map (read :: (String -> Int))) . words) $ lines s



log10 n
  | n >= 10 = 1 + log10 ( div n 10 )
  | n < 10 = 1