import Control.Monad                                                                                                                                   
main = do                                                                                                                                              
     rs <- getLine                                                                                                                                     
     when (not $ null rs) $ do                                                                                                                         
          print $ length . show . sum . map (read::String->Int) $ words rs
          main