object Main {
  def main(args: Array[String]) {
    val sc = new java.util.Scanner(System.in);
    val n = sc.nextInt();
    val min = sc.nextInt();
    val max = sc.nextInt();
    println((1 to n).filter(k => isBetween(k.toString.split("")
      .map(_.toInt).sum, min, max)).sum.toString);

    def isBetween(num: Int, min: Int, max: Int): Boolean = {
      min <= num && num <= max
    }
  }
}