"use strict";

const main=(input)=>{
    const args=input.split(' ').map((n)=>parseInt(n,10));
    const A = args[1];
    const B = args[2];
    const N = args[0];
    let total= 0;

    for(let i=1; i<=N;i++){
        let e = parseInt(String(i)[0],10)+parseInt(String(i)[1],10);
        if(A<= e <=B){
            total += i;
        }
    }
    console.log(total);
    }

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