import Control.Monad
import Control.Applicative
import Data.Char

main :: IO ()
main = do
  ss <- lines <$> getContents
  let ans = map (length . show . sum . getInts) ss
  mapM_ print ans
        
getInts :: String -> [Int]
getInts = map read . words