import java.util.ArrayList;
import java.util.Scanner;
public class Main {
	public static Integer sum(ArrayList<Integer> M) {
		int sum = 0;
		for(int i = 0; i < M.size(); i++) {
			sum += (int)M.get(i);
		}
		return(sum);
	}

	public static void main(String[] args) {
		int A,B,N;
		int s = 0;
		Scanner scan = new Scanner(System.in);
		N = scan.nextInt();
		A = scan.nextInt();
		B = scan.nextInt();
		ArrayList<Integer> M = new ArrayList<Integer>();

		for(int i = 1; i <= N; i++) {
			String str = String.valueOf(i);
			for(int j = 0; j < str.length(); j++) {
				char ch = str.charAt(j);
				int k = Character.getNumericValue(ch);
				M.add(k);
			}
			if(A <= sum(M) && sum(M) <= B) {
				s += i;
			}
			M.clear();
		}
		System.out.println(s);
		scan.close();
	}
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz