(require '[clojure.string :as str])

(def ab (map #(Integer. %) (str/split (read-line) #" ")))

(defn palindromic? [word]
  (= (seq word) (reverse word)))

(println 
  (count 
    (filter palindromic? 
            (map #(.toString %) 
                 (range (first ab) (+ 1 (last ab)))))))
