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();
        sc.close();

        int answer = 0;

        char[] char_ary = null;
        int sum = 0;
        boolean add_flg = true;
        for (int i = A; i <= N; i++) {
            char_ary = Integer.toString(i).toCharArray();

            sum = 0;
            add_flg = true;
            for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            }
            if (add_flg && sum >= A) {
                answer += i;
            }
        }

        System.out.println(answer);
    }
} 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();
        sc.close();

        int answer = 0;

        char[] char_ary = null;
        int sum = 0;
        boolean add_flg = true;
        for (int i = A; i <= N; i++) {
            char_ary = Integer.toString(i).toCharArray();

            sum = 0;
            add_flg = true;
            for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            }
            if (add_flg && sum >= A) {
                answer += i;
            }
        }

        System.out.println(answer);
    }
} 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();
        sc.close();

        int answer = 0;

        char[] char_ary = null;
        int sum = 0;
        boolean add_flg = true;
        for (int i = A; i <= N; i++) {
            char_ary = Integer.toString(i).toCharArray();

            sum = 0;
            add_flg = true;
            for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            }
            if (add_flg && sum >= A) {
                answer += i;
            }
        }

        System.out.println(answer);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        sc.close();

        int answer = 0;

        char[] char_ary = null;
        int sum = 0;
        boolean add_flg = true;
        for (int i = A; i <= N; i++) {
            char_ary = Integer.toString(i).toCharArray();

            sum = 0;
            add_flg = true;
            for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            }
            if (add_flg && sum >= A) {
                answer += i;
            }
        }

        System.out.println(answer);
    } 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 sc.close() sc.close sc int answer = 0; answer 0 char[] char_ary = null; char_ary null int sum = 0; sum 0 boolean add_flg = true; add_flg true for (int i = A; i <= N; i++) {
            char_ary = Integer.toString(i).toCharArray();

            sum = 0;
            add_flg = true;
            for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            }
            if (add_flg && sum >= A) {
                answer += i;
            }
        } int i = A; int i = A; i A i <= N i N i++ i++ i {
            char_ary = Integer.toString(i).toCharArray();

            sum = 0;
            add_flg = true;
            for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            }
            if (add_flg && sum >= A) {
                answer += i;
            }
        } {
            char_ary = Integer.toString(i).toCharArray();

            sum = 0;
            add_flg = true;
            for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            }
            if (add_flg && sum >= A) {
                answer += i;
            }
        } char_ary = Integer.toString(i).toCharArray() char_ary Integer.toString(i).toCharArray() Integer.toString(i).toCharArray Integer.toString(i) Integer.toString Integer i sum = 0 sum 0 add_flg = true add_flg true for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            } char elm char_ary {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            } {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            } sum += Character.getNumericValue(elm) sum Character.getNumericValue(elm) Character.getNumericValue Character elm if (sum > B) {
                    add_flg = false;
                    break;
                } sum > B sum B {
                    add_flg = false;
                    break;
                } add_flg = false add_flg false break; if (add_flg && sum >= A) {
                answer += i;
            } add_flg && sum >= A add_flg sum >= A sum A {
                answer += i;
            } answer += i answer i System.out.println(answer) System.out.println System.out System System.out answer 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();
        sc.close();

        int answer = 0;

        char[] char_ary = null;
        int sum = 0;
        boolean add_flg = true;
        for (int i = A; i <= N; i++) {
            char_ary = Integer.toString(i).toCharArray();

            sum = 0;
            add_flg = true;
            for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            }
            if (add_flg && sum >= A) {
                answer += i;
            }
        }

        System.out.println(answer);
    }
} 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();
        sc.close();

        int answer = 0;

        char[] char_ary = null;
        int sum = 0;
        boolean add_flg = true;
        for (int i = A; i <= N; i++) {
            char_ary = Integer.toString(i).toCharArray();

            sum = 0;
            add_flg = true;
            for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            }
            if (add_flg && sum >= A) {
                answer += i;
            }
        }

        System.out.println(answer);
    }
} 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();
        sc.close();

        int answer = 0;

        char[] char_ary = null;
        int sum = 0;
        boolean add_flg = true;
        for (int i = A; i <= N; i++) {
            char_ary = Integer.toString(i).toCharArray();

            sum = 0;
            add_flg = true;
            for (char elm : char_ary) {
                sum += Character.getNumericValue(elm);
                if (sum > B) {
                    add_flg = false;
                    break;
                }
            }
            if (add_flg && sum >= A) {
                answer += i;
            }
        }

        System.out.println(answer);
    }
}