function main(s) {
	var s = s.split("\n")[0].split(" ").map(x => Number(x));
	var a = 0;
	for (var i = 1; i <= s[0]; i++) {
		var t = i.toString();
		var x = 0;
		for (var j = 0; j < t.length; j++) {
			x += Number(t[j]);
		}
		if ((x >= s[1]) && (x <= s[2])) {a += i};
	}
	console.log(a);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));

