'use strict'

function Main(input) {
  const inputList = input.split(' ');
  const n = Number(inputList[0])
  const a = Number(inputList[1])
  const b = Number(inputList[2])
  let sum = 0

  for (let i=1; i<=n; i++) {
    let digitTotal = 0
    let tmpN = i
    while (tmpN>0) {
      digitTotal = digitTotal + (tmpN % 10)
      tmpN = Math.floor(tmpN/10)
    }

    if (digitTotal >= a && digitTotal <= b) {
      sum += i
    }
  }

  console.log(sum)
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));