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 total = 0; 
		
		for (int i = 1; i <= N ; i++ ) {
			
			String judge = String.valueOf(i);
			
			String[] nums = judge.split("");
			
			
			int judgeNum = 0; 
			
			for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			}
			
			if (A <= judgeNum && B >= judgeNum ) 
				total += i; 
			
		}
		
		System.out.println(total);
					
	}	


} 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 total = 0; 
		
		for (int i = 1; i <= N ; i++ ) {
			
			String judge = String.valueOf(i);
			
			String[] nums = judge.split("");
			
			
			int judgeNum = 0; 
			
			for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			}
			
			if (A <= judgeNum && B >= judgeNum ) 
				total += i; 
			
		}
		
		System.out.println(total);
					
	}	


} 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 total = 0; 
		
		for (int i = 1; i <= N ; i++ ) {
			
			String judge = String.valueOf(i);
			
			String[] nums = judge.split("");
			
			
			int judgeNum = 0; 
			
			for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			}
			
			if (A <= judgeNum && B >= judgeNum ) 
				total += i; 
			
		}
		
		System.out.println(total);
					
	} main {
		Scanner sc = new Scanner(System.in);
		
		int N =  sc.nextInt();
		
		int A = sc.nextInt();
		
		int B = sc.nextInt();
		
		int total = 0; 
		
		for (int i = 1; i <= N ; i++ ) {
			
			String judge = String.valueOf(i);
			
			String[] nums = judge.split("");
			
			
			int judgeNum = 0; 
			
			for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			}
			
			if (A <= judgeNum && B >= judgeNum ) 
				total += i; 
			
		}
		
		System.out.println(total);
					
	} 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 total = 0; total 0 for (int i = 1; i <= N ; i++ ) {
			
			String judge = String.valueOf(i);
			
			String[] nums = judge.split("");
			
			
			int judgeNum = 0; 
			
			for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			}
			
			if (A <= judgeNum && B >= judgeNum ) 
				total += i; 
			
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			
			String judge = String.valueOf(i);
			
			String[] nums = judge.split("");
			
			
			int judgeNum = 0; 
			
			for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			}
			
			if (A <= judgeNum && B >= judgeNum ) 
				total += i; 
			
		} {
			
			String judge = String.valueOf(i);
			
			String[] nums = judge.split("");
			
			
			int judgeNum = 0; 
			
			for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			}
			
			if (A <= judgeNum && B >= judgeNum ) 
				total += i; 
			
		} String judge = String.valueOf(i); judge String.valueOf(i) String.valueOf String i String[] nums = judge.split(""); nums judge.split("") judge.split judge "" int judgeNum = 0; judgeNum 0 for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			} String numString nums {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			} {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			} int num = Integer.parseInt(numString); num Integer.parseInt(numString) Integer.parseInt Integer numString judgeNum  += num judgeNum num if (A <= judgeNum && B >= judgeNum ) 
				total += i; A <= judgeNum && B >= judgeNum A <= judgeNum A judgeNum B >= judgeNum B judgeNum total += i total i System.out.println(total) System.out.println System.out System System.out total 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 total = 0; 
		
		for (int i = 1; i <= N ; i++ ) {
			
			String judge = String.valueOf(i);
			
			String[] nums = judge.split("");
			
			
			int judgeNum = 0; 
			
			for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			}
			
			if (A <= judgeNum && B >= judgeNum ) 
				total += i; 
			
		}
		
		System.out.println(total);
					
	}	


} 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 total = 0; 
		
		for (int i = 1; i <= N ; i++ ) {
			
			String judge = String.valueOf(i);
			
			String[] nums = judge.split("");
			
			
			int judgeNum = 0; 
			
			for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			}
			
			if (A <= judgeNum && B >= judgeNum ) 
				total += i; 
			
		}
		
		System.out.println(total);
					
	}	


} 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 total = 0; 
		
		for (int i = 1; i <= N ; i++ ) {
			
			String judge = String.valueOf(i);
			
			String[] nums = judge.split("");
			
			
			int judgeNum = 0; 
			
			for (String numString :nums) {
			
				int num = Integer.parseInt(numString);
			
				judgeNum  += num;
			}
			
			if (A <= judgeNum && B >= judgeNum ) 
				total += i; 
			
		}
		
		System.out.println(total);
					
	}	


}