
import Data.List
import Control.Monad
import Control.Applicative

main = do
  [a,b] <- map read.words <$> getLine ::IO [Int]
  putStrLn $ show $ length $ filter (\e -> (show e) == reverse (show e)) [a..b] 


