import Data.List
import Control.Applicative

readInt :: String -> Int
readInt = read

main = do
  ls <- fmap (length . show . sum . fmap readInt) . fmap words . lines <$> getContents
  mapM_ print ls
