(ns Atcoder.ABC083-B)
(require '[clojure.string :as str])
(def input (map read-string (str/split (read-line) #" ")))  ;inputの値を代入 N A B

(def N (nth input 0))
(def A (nth input 1))
(def B (nth input 2))

(defn sumDigits [x]                                         ;整数値xの各桁の和
  (reduce + (map (fn [z] (- (int z) (int \0))) (seq (str x))))
  )

(def ans
  (reduce + (filter (fn [x]
                      (def sum (sumDigits x))
                      (and (>= sum A) (<= sum B)))
                    (range 1 (+ N 1))
                    )
          )
  )

(println ans)