import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		int A=sc.nextInt();
		int B=sc.nextInt();
		int sum_digit;
		int digit;
		int sum=0;
		int n;
		for(int i=1;i<=N;i++){
			sum_digit=0;
			digit=10000;
			n=i;
			while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			}
			if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			}
		}
		System.out.println(sum);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		int A=sc.nextInt();
		int B=sc.nextInt();
		int sum_digit;
		int digit;
		int sum=0;
		int n;
		for(int i=1;i<=N;i++){
			sum_digit=0;
			digit=10000;
			n=i;
			while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			}
			if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			}
		}
		System.out.println(sum);
	}
} Main public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		int A=sc.nextInt();
		int B=sc.nextInt();
		int sum_digit;
		int digit;
		int sum=0;
		int n;
		for(int i=1;i<=N;i++){
			sum_digit=0;
			digit=10000;
			n=i;
			while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			}
			if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			}
		}
		System.out.println(sum);
	} main {
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		int A=sc.nextInt();
		int B=sc.nextInt();
		int sum_digit;
		int digit;
		int sum=0;
		int n;
		for(int i=1;i<=N;i++){
			sum_digit=0;
			digit=10000;
			n=i;
			while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			}
			if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			}
		}
		System.out.println(sum);
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc int A=sc.nextInt(); A sc.nextInt() sc.nextInt sc int B=sc.nextInt(); B sc.nextInt() sc.nextInt sc int sum_digit; sum_digit int digit; digit int sum=0; sum 0 int n; n for(int i=1;i<=N;i++){
			sum_digit=0;
			digit=10000;
			n=i;
			while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			}
			if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			}
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			sum_digit=0;
			digit=10000;
			n=i;
			while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			}
			if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			}
		} {
			sum_digit=0;
			digit=10000;
			n=i;
			while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			}
			if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			}
		} sum_digit=0 sum_digit 0 digit=10000 digit 10000 n=i n i while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			} digit>=1 digit 1 {
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			} sum_digit+=n/digit sum_digit n/digit n digit n=n%digit n n%digit n digit digit=digit/10 digit digit/10 digit 10 if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			} A<=sum_digit&&B>=sum_digit A<=sum_digit A sum_digit B>=sum_digit B sum_digit {
				sum+=i;
			} sum+=i sum i System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		int A=sc.nextInt();
		int B=sc.nextInt();
		int sum_digit;
		int digit;
		int sum=0;
		int n;
		for(int i=1;i<=N;i++){
			sum_digit=0;
			digit=10000;
			n=i;
			while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			}
			if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			}
		}
		System.out.println(sum);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		int A=sc.nextInt();
		int B=sc.nextInt();
		int sum_digit;
		int digit;
		int sum=0;
		int n;
		for(int i=1;i<=N;i++){
			sum_digit=0;
			digit=10000;
			n=i;
			while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			}
			if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			}
		}
		System.out.println(sum);
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		int A=sc.nextInt();
		int B=sc.nextInt();
		int sum_digit;
		int digit;
		int sum=0;
		int n;
		for(int i=1;i<=N;i++){
			sum_digit=0;
			digit=10000;
			n=i;
			while(digit>=1){
				sum_digit+=n/digit;
				n=n%digit;
				digit=digit/10;
				// System.out.println(n);
			}
			if(A<=sum_digit&&B>=sum_digit){
				sum+=i;
			}
		}
		System.out.println(sum);
	}
}
