import java.util.Scanner;

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 count = 0;

        for (int i = 1; i <= n; i++) {
            int i1 = i / 10000;
            int i2 = (i % 10000) / 1000;
            int i3 = (i % 1000) / 100;
            int i4 = (i % 100) / 10;
            int i5 = i % 10;
            int add = i1 + i2 + i3 + i4 + i5;
            if (a <= add && add <= b) {
                count += i;
            }
        }
        System.out.println(count);
    }
}
 import java.util.Scanner; Scanner 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 count = 0;

        for (int i = 1; i <= n; i++) {
            int i1 = i / 10000;
            int i2 = (i % 10000) / 1000;
            int i3 = (i % 1000) / 100;
            int i4 = (i % 100) / 10;
            int i5 = i % 10;
            int add = i1 + i2 + i3 + i4 + i5;
            if (a <= add && add <= b) {
                count += i;
            }
        }
        System.out.println(count);
    }
} 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 count = 0;

        for (int i = 1; i <= n; i++) {
            int i1 = i / 10000;
            int i2 = (i % 10000) / 1000;
            int i3 = (i % 1000) / 100;
            int i4 = (i % 100) / 10;
            int i5 = i % 10;
            int add = i1 + i2 + i3 + i4 + i5;
            if (a <= add && add <= b) {
                count += i;
            }
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int count = 0;

        for (int i = 1; i <= n; i++) {
            int i1 = i / 10000;
            int i2 = (i % 10000) / 1000;
            int i3 = (i % 1000) / 100;
            int i4 = (i % 100) / 10;
            int i5 = i % 10;
            int add = i1 + i2 + i3 + i4 + i5;
            if (a <= add && add <= b) {
                count += i;
            }
        }
        System.out.println(count);
    } 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 count = 0; count 0 for (int i = 1; i <= n; i++) {
            int i1 = i / 10000;
            int i2 = (i % 10000) / 1000;
            int i3 = (i % 1000) / 100;
            int i4 = (i % 100) / 10;
            int i5 = i % 10;
            int add = i1 + i2 + i3 + i4 + i5;
            if (a <= add && add <= b) {
                count += i;
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            int i1 = i / 10000;
            int i2 = (i % 10000) / 1000;
            int i3 = (i % 1000) / 100;
            int i4 = (i % 100) / 10;
            int i5 = i % 10;
            int add = i1 + i2 + i3 + i4 + i5;
            if (a <= add && add <= b) {
                count += i;
            }
        } {
            int i1 = i / 10000;
            int i2 = (i % 10000) / 1000;
            int i3 = (i % 1000) / 100;
            int i4 = (i % 100) / 10;
            int i5 = i % 10;
            int add = i1 + i2 + i3 + i4 + i5;
            if (a <= add && add <= b) {
                count += i;
            }
        } int i1 = i / 10000; i1 i / 10000 i 10000 int i2 = (i % 10000) / 1000; i2 (i % 10000) / 1000 (i % 10000) i 10000 1000 int i3 = (i % 1000) / 100; i3 (i % 1000) / 100 (i % 1000) i 1000 100 int i4 = (i % 100) / 10; i4 (i % 100) / 10 (i % 100) i 100 10 int i5 = i % 10; i5 i % 10 i 10 int add = i1 + i2 + i3 + i4 + i5; add i1 + i2 + i3 + i4 + i5 i4 i3 i1 + i2 + i3 + i4 + i5 i1 i2 i3 i4 i5 if (a <= add && add <= b) {
                count += i;
            } a <= add && add <= b a <= add a add add <= b add b {
                count += i;
            } count += i count i System.out.println(count) System.out.println System.out System System.out count 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 count = 0;

        for (int i = 1; i <= n; i++) {
            int i1 = i / 10000;
            int i2 = (i % 10000) / 1000;
            int i3 = (i % 1000) / 100;
            int i4 = (i % 100) / 10;
            int i5 = i % 10;
            int add = i1 + i2 + i3 + i4 + i5;
            if (a <= add && add <= b) {
                count += i;
            }
        }
        System.out.println(count);
    }
} 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 count = 0;

        for (int i = 1; i <= n; i++) {
            int i1 = i / 10000;
            int i2 = (i % 10000) / 1000;
            int i3 = (i % 1000) / 100;
            int i4 = (i % 100) / 10;
            int i5 = i % 10;
            int add = i1 + i2 + i3 + i4 + i5;
            if (a <= add && add <= b) {
                count += i;
            }
        }
        System.out.println(count);
    }
} Main
import java.util.Scanner;

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 count = 0;

        for (int i = 1; i <= n; i++) {
            int i1 = i / 10000;
            int i2 = (i % 10000) / 1000;
            int i3 = (i % 1000) / 100;
            int i4 = (i % 100) / 10;
            int i5 = i % 10;
            int add = i1 + i2 + i3 + i4 + i5;
            if (a <= add && add <= b) {
                count += i;
            }
        }
        System.out.println(count);
    }
}

