import           System.IO
import           Control.Monad
import           Control.Applicative
import           Control.Monad.State
import           Data.List

calc :: String -> String
calc str = show $ length $ show $ sum $ take 2 $ map read (words str)

main = do
  line <- getLine
  putStrLn $ calc line
  eof <- isEOF
  unless eof $ main

