f :: [String] -> Int
f [] = 0
f (s:ss) = (read s) + f ss

main :: IO()
main = do
    c <- getContents
    let pl = map words (lines c)
        sl = map f pl
        al = map show sl
        ll = map length al
    mapM_ print ll