
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int A = scanner.nextInt();
        int B = scanner.nextInt();

        int total = 0;
        for (int s=1; s <= N; s++) {
            String value = String.valueOf(s);
            int length = value.length();

            int sum = 0;
            for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            }

            if (sum >= A && sum <= B) {
                total += s;
            }
        }
        System.out.println(total);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int A = scanner.nextInt();
        int B = scanner.nextInt();

        int total = 0;
        for (int s=1; s <= N; s++) {
            String value = String.valueOf(s);
            int length = value.length();

            int sum = 0;
            for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            }

            if (sum >= A && sum <= B) {
                total += s;
            }
        }
        System.out.println(total);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int A = scanner.nextInt();
        int B = scanner.nextInt();

        int total = 0;
        for (int s=1; s <= N; s++) {
            String value = String.valueOf(s);
            int length = value.length();

            int sum = 0;
            for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            }

            if (sum >= A && sum <= B) {
                total += s;
            }
        }
        System.out.println(total);
    } main {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int A = scanner.nextInt();
        int B = scanner.nextInt();

        int total = 0;
        for (int s=1; s <= N; s++) {
            String value = String.valueOf(s);
            int length = value.length();

            int sum = 0;
            for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            }

            if (sum >= A && sum <= B) {
                total += s;
            }
        }
        System.out.println(total);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int A = scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B = scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner int total = 0; total 0 for (int s=1; s <= N; s++) {
            String value = String.valueOf(s);
            int length = value.length();

            int sum = 0;
            for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            }

            if (sum >= A && sum <= B) {
                total += s;
            }
        } int s=1; int s=1; s 1 s <= N s N s++ s++ s {
            String value = String.valueOf(s);
            int length = value.length();

            int sum = 0;
            for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            }

            if (sum >= A && sum <= B) {
                total += s;
            }
        } {
            String value = String.valueOf(s);
            int length = value.length();

            int sum = 0;
            for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            }

            if (sum >= A && sum <= B) {
                total += s;
            }
        } String value = String.valueOf(s); value String.valueOf(s) String.valueOf String s int length = value.length(); length value.length() value.length value int sum = 0; sum 0 for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            } int t=0; int t=0; t 0 t < length t length t++ t++ t {
                sum += value.charAt(t) - '0';
            } {
                sum += value.charAt(t) - '0';
            } sum += value.charAt(t) - '0' sum value.charAt(t) - '0' value.charAt(t) value.charAt value t '0' if (sum >= A && sum <= B) {
                total += s;
            } sum >= A && sum <= B sum >= A sum A sum <= B sum B {
                total += s;
            } total += s total s 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 scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int A = scanner.nextInt();
        int B = scanner.nextInt();

        int total = 0;
        for (int s=1; s <= N; s++) {
            String value = String.valueOf(s);
            int length = value.length();

            int sum = 0;
            for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            }

            if (sum >= A && sum <= B) {
                total += s;
            }
        }
        System.out.println(total);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int A = scanner.nextInt();
        int B = scanner.nextInt();

        int total = 0;
        for (int s=1; s <= N; s++) {
            String value = String.valueOf(s);
            int length = value.length();

            int sum = 0;
            for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            }

            if (sum >= A && sum <= B) {
                total += s;
            }
        }
        System.out.println(total);
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int A = scanner.nextInt();
        int B = scanner.nextInt();

        int total = 0;
        for (int s=1; s <= N; s++) {
            String value = String.valueOf(s);
            int length = value.length();

            int sum = 0;
            for (int t=0; t < length; t++) {
                sum += value.charAt(t) - '0';
            }

            if (sum >= A && sum <= B) {
                total += s;
            }
        }
        System.out.println(total);
    }
}
