main = do
    line <- getLine
    if null line
    then return ()
    else putStrLn . show $ solve line
    main

solve :: String -> Int
solve = length . show . sum . map (\x -> read x :: Int) . words