import Control.Monad
import Control.Applicative
import Data.Functor
import Data.List
import Data.Char

readInt = readLn :: IO Int

main = map (map read . words) . lines <$> getContents >>= mapM_ (print . length . show . sum)