"use strict";

function Main(input) {
  input = input.split('\n');
  var ans = 0;
  var args = input[0].split(' ');
  var min = Number(args[1]);
  var max = Number(args[2]);
  var num = Number(args[0]);

  var _loop = function _loop(i) {
    var splitNum = String(i).split('');
    var sum = 0;
    splitNum.forEach(function (data) {
      sum = sum + Number(data);
    });
    if (min <= sum && sum <= max) ans = ans + i;
  };

  for (var i = 1; i <= num; i++) {
    _loop(i);
  }

  console.log(ans);
}

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