countDigit :: [Double] -> Int
countDigit ns = floor (log (foldl (+) 0 ns) / (log 10)) + 1

count :: String -> String
count s = show $ countDigit $ map read (words s)

main :: IO ()
main = interact (unlines . (map count) . lines)