"use strict";

var main = function main(input) {
  var N = parseInt(input.split(" ")[0]);
  var A = parseInt(input.split(" ")[1]);
  var B = parseInt(input.split(" ")[2]);
  var count = 0;

  for (var i = 1; i <= N; i++) {
    var sum = 0;
    var arr = i.toString().split("");
    var num = arr.length;

    for (var j = 0; j < num; j++) {
      sum += parseInt(arr[j], 10);
    }

    if (sum <= B && sum >= A) {
      count += i;
    }
  }

  console.log(count);
};

main(require('fs').readFileSync('/dev/stdin', 'utf8'));