'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++) {
    const fifthDigit = Math.floor(i/10000)
    const fourDigit = Math.floor((i-10000*fifthDigit )/1000)
    const thirdDigit = Math.floor((i-10000*fifthDigit-1000*fourDigit)/100)
    const secondDigit = Math.floor((i-10000*fifthDigit-1000*fourDigit-100*thirdDigit)/10)
    const firstDigit =  Math.floor((i-10000*fifthDigit-1000*fourDigit-100*thirdDigit-10*secondDigit)/1)
    const digitTotal = fifthDigit + fourDigit + thirdDigit + secondDigit + firstDigit

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

  console.log(sum)
}

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