import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  [a,b] <- map (read::String->Int) . words <$> getLine
  print $ length [x|x<-[a..b], take 2 (show x)==drop 3 (show x)]