'use strict'

let Main = (input) => {
  let v = input.split(' ')
  let v1 = v[0], v2 = v[1], v3 = v[2]
  let allSum = 0
  for(let i=1; i <= v1; i++){
    let len = i.toString().length
    let sum = 0
    for(let j=0; j <= len-1; j++){
      sum =+ i.toString().substr(j,1)
    }
    if(sum >= v2 && sum <= v3){
      allSum += 1
    }
//    console.log('i:' + i + ' len:' + len + ' sum:' + sum + ' allSum' + allSum)
  }
  console.log(allSum)
  
}

Main(require('fs').readFileSync('/dev/stdin','utf-8'))