// This template is based on Mr. tonymontaro's template (https://atcoder.jp/users/tonymontaro).
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    static PrintWriter out;
    static CF_Reader in;

    public static void main(String[] args) throws IOException {
        out = new PrintWriter(new OutputStreamWriter(System.out));
        in = new CF_Reader();
        StringBuilder result = new StringBuilder();

        // Start: int型の整数n mを取得する
        // // N M 形式
        int N = in.intNext();
        int A = in.intNext();
        int B = in.intNext();
        // End: int型の整数n mを取得する

        int resSum = 0;
        for (int i = 0; i <= N; i++) {
          String c = String.valueOf(i);
          char[] work = new char[c.length()];
          int sum = 0;
          for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          }
          if (A <= sum && sum <= B) resSum += i;
        }
        result.append(resSum);

        // Start: int型の整数Nと配列Aを取得する
        // // N
        // // A1 A2 A3... AN 形式
        // int n = in.intNext();
        // int[] A = in.nextIntArray(n);
        // End: int型の整数Nと配列Aを取得する

        // Start: Char型の文字をInt型に変換する
        // Integer.parseInt(String.valueOf(charText))
        // End: Char型の文字をInt型に変換する

        // Start: 文字列を1文字ずつ出力する
        // String text = in.next();
        // char[] work = new char[text.length()];
        // for(int i = 0; i < text.length(); i++){
        //   work[i] = text.charAt(i); // Char型の文字
        //   out.println(work[i]);
        // }
        // End: 文字列を1文字ずつ出力する

        out.println(result);

        out.close();
    }

    static class CF_Reader {
        BufferedReader br;
        StringTokenizer st;

        public CF_Reader() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        }

        long longNext() throws IOException {
            return Long.parseLong(next());
        }

        int intNext() throws IOException {
            return Integer.parseInt(next());
        }

        double doubleNext() throws IOException {
            return Double.parseDouble(next());
        }

        char charNext() throws IOException {
            return next().charAt(0);
        }

        public int[] nextIntArray(final int n) throws IOException {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        }

        public long[] nextLongArray(final int n) throws IOException {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = longNext();
            return a;
        }

        String line() throws IOException {
            return br.readLine().trim();
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    static PrintWriter out;
    static CF_Reader in;

    public static void main(String[] args) throws IOException {
        out = new PrintWriter(new OutputStreamWriter(System.out));
        in = new CF_Reader();
        StringBuilder result = new StringBuilder();

        // Start: int型の整数n mを取得する
        // // N M 形式
        int N = in.intNext();
        int A = in.intNext();
        int B = in.intNext();
        // End: int型の整数n mを取得する

        int resSum = 0;
        for (int i = 0; i <= N; i++) {
          String c = String.valueOf(i);
          char[] work = new char[c.length()];
          int sum = 0;
          for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          }
          if (A <= sum && sum <= B) resSum += i;
        }
        result.append(resSum);

        // Start: int型の整数Nと配列Aを取得する
        // // N
        // // A1 A2 A3... AN 形式
        // int n = in.intNext();
        // int[] A = in.nextIntArray(n);
        // End: int型の整数Nと配列Aを取得する

        // Start: Char型の文字をInt型に変換する
        // Integer.parseInt(String.valueOf(charText))
        // End: Char型の文字をInt型に変換する

        // Start: 文字列を1文字ずつ出力する
        // String text = in.next();
        // char[] work = new char[text.length()];
        // for(int i = 0; i < text.length(); i++){
        //   work[i] = text.charAt(i); // Char型の文字
        //   out.println(work[i]);
        // }
        // End: 文字列を1文字ずつ出力する

        out.println(result);

        out.close();
    }

    static class CF_Reader {
        BufferedReader br;
        StringTokenizer st;

        public CF_Reader() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        }

        long longNext() throws IOException {
            return Long.parseLong(next());
        }

        int intNext() throws IOException {
            return Integer.parseInt(next());
        }

        double doubleNext() throws IOException {
            return Double.parseDouble(next());
        }

        char charNext() throws IOException {
            return next().charAt(0);
        }

        public int[] nextIntArray(final int n) throws IOException {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        }

        public long[] nextLongArray(final int n) throws IOException {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = longNext();
            return a;
        }

        String line() throws IOException {
            return br.readLine().trim();
        }
    }
} Main static PrintWriter out; out static CF_Reader in; in public static void main(String[] args) throws IOException {
        out = new PrintWriter(new OutputStreamWriter(System.out));
        in = new CF_Reader();
        StringBuilder result = new StringBuilder();

        // Start: int型の整数n mを取得する
        // // N M 形式
        int N = in.intNext();
        int A = in.intNext();
        int B = in.intNext();
        // End: int型の整数n mを取得する

        int resSum = 0;
        for (int i = 0; i <= N; i++) {
          String c = String.valueOf(i);
          char[] work = new char[c.length()];
          int sum = 0;
          for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          }
          if (A <= sum && sum <= B) resSum += i;
        }
        result.append(resSum);

        // Start: int型の整数Nと配列Aを取得する
        // // N
        // // A1 A2 A3... AN 形式
        // int n = in.intNext();
        // int[] A = in.nextIntArray(n);
        // End: int型の整数Nと配列Aを取得する

        // Start: Char型の文字をInt型に変換する
        // Integer.parseInt(String.valueOf(charText))
        // End: Char型の文字をInt型に変換する

        // Start: 文字列を1文字ずつ出力する
        // String text = in.next();
        // char[] work = new char[text.length()];
        // for(int i = 0; i < text.length(); i++){
        //   work[i] = text.charAt(i); // Char型の文字
        //   out.println(work[i]);
        // }
        // End: 文字列を1文字ずつ出力する

        out.println(result);

        out.close();
    } main {
        out = new PrintWriter(new OutputStreamWriter(System.out));
        in = new CF_Reader();
        StringBuilder result = new StringBuilder();

        // Start: int型の整数n mを取得する
        // // N M 形式
        int N = in.intNext();
        int A = in.intNext();
        int B = in.intNext();
        // End: int型の整数n mを取得する

        int resSum = 0;
        for (int i = 0; i <= N; i++) {
          String c = String.valueOf(i);
          char[] work = new char[c.length()];
          int sum = 0;
          for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          }
          if (A <= sum && sum <= B) resSum += i;
        }
        result.append(resSum);

        // Start: int型の整数Nと配列Aを取得する
        // // N
        // // A1 A2 A3... AN 形式
        // int n = in.intNext();
        // int[] A = in.nextIntArray(n);
        // End: int型の整数Nと配列Aを取得する

        // Start: Char型の文字をInt型に変換する
        // Integer.parseInt(String.valueOf(charText))
        // End: Char型の文字をInt型に変換する

        // Start: 文字列を1文字ずつ出力する
        // String text = in.next();
        // char[] work = new char[text.length()];
        // for(int i = 0; i < text.length(); i++){
        //   work[i] = text.charAt(i); // Char型の文字
        //   out.println(work[i]);
        // }
        // End: 文字列を1文字ずつ出力する

        out.println(result);

        out.close();
    } out = new PrintWriter(new OutputStreamWriter(System.out)) out new PrintWriter(new OutputStreamWriter(System.out)) in = new CF_Reader() in new CF_Reader() StringBuilder result = new StringBuilder(); result new StringBuilder() int N = in.intNext(); N in.intNext() in.intNext in int A = in.intNext(); A in.intNext() in.intNext in int B = in.intNext(); B in.intNext() in.intNext in int resSum = 0; resSum 0 for (int i = 0; i <= N; i++) {
          String c = String.valueOf(i);
          char[] work = new char[c.length()];
          int sum = 0;
          for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          }
          if (A <= sum && sum <= B) resSum += i;
        } int i = 0; int i = 0; i 0 i <= N i N i++ i++ i {
          String c = String.valueOf(i);
          char[] work = new char[c.length()];
          int sum = 0;
          for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          }
          if (A <= sum && sum <= B) resSum += i;
        } {
          String c = String.valueOf(i);
          char[] work = new char[c.length()];
          int sum = 0;
          for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          }
          if (A <= sum && sum <= B) resSum += i;
        } String c = String.valueOf(i); c String.valueOf(i) String.valueOf String i char[] work = new char[c.length()]; work new char[c.length()] c.length() c.length c int sum = 0; sum 0 for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          } int j = 0; int j = 0; j 0 j < c.length() j c.length() c.length c j++ j++ j {
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          } {
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          } work[j] = c.charAt(j) work[j] work j c.charAt(j) c.charAt c j sum += Integer.parseInt(String.valueOf(work[j])) sum Integer.parseInt(String.valueOf(work[j])) Integer.parseInt Integer String.valueOf(work[j]) String.valueOf String work[j] work j if (A <= sum && sum <= B) resSum += i; A <= sum && sum <= B A <= sum A sum sum <= B sum B resSum += i resSum i result.append(resSum) result.append result resSum out.println(result) out.println out result out.close() out.close out String[] args args static class CF_Reader {
        BufferedReader br;
        StringTokenizer st;

        public CF_Reader() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        }

        long longNext() throws IOException {
            return Long.parseLong(next());
        }

        int intNext() throws IOException {
            return Integer.parseInt(next());
        }

        double doubleNext() throws IOException {
            return Double.parseDouble(next());
        }

        char charNext() throws IOException {
            return next().charAt(0);
        }

        public int[] nextIntArray(final int n) throws IOException {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        }

        public long[] nextLongArray(final int n) throws IOException {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = longNext();
            return a;
        }

        String line() throws IOException {
            return br.readLine().trim();
        }
    } CF_Reader BufferedReader br; br StringTokenizer st; st public CF_Reader() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
        } CF_Reader {
            br = new BufferedReader(new InputStreamReader(System.in));
        } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        } while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine().trim()) st new StringTokenizer(br.readLine().trim()) return st.nextToken(); st.nextToken() st.nextToken st long longNext() throws IOException {
            return Long.parseLong(next());
        } longNext {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next int intNext() throws IOException {
            return Integer.parseInt(next());
        } intNext {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next double doubleNext() throws IOException {
            return Double.parseDouble(next());
        } doubleNext {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next char charNext() throws IOException {
            return next().charAt(0);
        } charNext {
            return next().charAt(0);
        } return next().charAt(0); next().charAt(0) next().charAt next() next 0 public int[] nextIntArray(final int n) throws IOException {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        } nextIntArray {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        } final int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++)
                a[i] = intNext(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = intNext(); a[i] = intNext() a[i] a i intNext() intNext return a; a final int n n public long[] nextLongArray(final int n) throws IOException {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = longNext();
            return a;
        } nextLongArray {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = longNext();
            return a;
        } final long[] a = new long[n]; a new long[n] n for (int i = 0; i < n; i++)
                a[i] = longNext(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = longNext(); a[i] = longNext() a[i] a i longNext() longNext return a; a final int n n String line() throws IOException {
            return br.readLine().trim();
        } line {
            return br.readLine().trim();
        } return br.readLine().trim(); br.readLine().trim() br.readLine().trim br.readLine() br.readLine br public class Main {
    static PrintWriter out;
    static CF_Reader in;

    public static void main(String[] args) throws IOException {
        out = new PrintWriter(new OutputStreamWriter(System.out));
        in = new CF_Reader();
        StringBuilder result = new StringBuilder();

        // Start: int型の整数n mを取得する
        // // N M 形式
        int N = in.intNext();
        int A = in.intNext();
        int B = in.intNext();
        // End: int型の整数n mを取得する

        int resSum = 0;
        for (int i = 0; i <= N; i++) {
          String c = String.valueOf(i);
          char[] work = new char[c.length()];
          int sum = 0;
          for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          }
          if (A <= sum && sum <= B) resSum += i;
        }
        result.append(resSum);

        // Start: int型の整数Nと配列Aを取得する
        // // N
        // // A1 A2 A3... AN 形式
        // int n = in.intNext();
        // int[] A = in.nextIntArray(n);
        // End: int型の整数Nと配列Aを取得する

        // Start: Char型の文字をInt型に変換する
        // Integer.parseInt(String.valueOf(charText))
        // End: Char型の文字をInt型に変換する

        // Start: 文字列を1文字ずつ出力する
        // String text = in.next();
        // char[] work = new char[text.length()];
        // for(int i = 0; i < text.length(); i++){
        //   work[i] = text.charAt(i); // Char型の文字
        //   out.println(work[i]);
        // }
        // End: 文字列を1文字ずつ出力する

        out.println(result);

        out.close();
    }

    static class CF_Reader {
        BufferedReader br;
        StringTokenizer st;

        public CF_Reader() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        }

        long longNext() throws IOException {
            return Long.parseLong(next());
        }

        int intNext() throws IOException {
            return Integer.parseInt(next());
        }

        double doubleNext() throws IOException {
            return Double.parseDouble(next());
        }

        char charNext() throws IOException {
            return next().charAt(0);
        }

        public int[] nextIntArray(final int n) throws IOException {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        }

        public long[] nextLongArray(final int n) throws IOException {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = longNext();
            return a;
        }

        String line() throws IOException {
            return br.readLine().trim();
        }
    }
} public class Main {
    static PrintWriter out;
    static CF_Reader in;

    public static void main(String[] args) throws IOException {
        out = new PrintWriter(new OutputStreamWriter(System.out));
        in = new CF_Reader();
        StringBuilder result = new StringBuilder();

        // Start: int型の整数n mを取得する
        // // N M 形式
        int N = in.intNext();
        int A = in.intNext();
        int B = in.intNext();
        // End: int型の整数n mを取得する

        int resSum = 0;
        for (int i = 0; i <= N; i++) {
          String c = String.valueOf(i);
          char[] work = new char[c.length()];
          int sum = 0;
          for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          }
          if (A <= sum && sum <= B) resSum += i;
        }
        result.append(resSum);

        // Start: int型の整数Nと配列Aを取得する
        // // N
        // // A1 A2 A3... AN 形式
        // int n = in.intNext();
        // int[] A = in.nextIntArray(n);
        // End: int型の整数Nと配列Aを取得する

        // Start: Char型の文字をInt型に変換する
        // Integer.parseInt(String.valueOf(charText))
        // End: Char型の文字をInt型に変換する

        // Start: 文字列を1文字ずつ出力する
        // String text = in.next();
        // char[] work = new char[text.length()];
        // for(int i = 0; i < text.length(); i++){
        //   work[i] = text.charAt(i); // Char型の文字
        //   out.println(work[i]);
        // }
        // End: 文字列を1文字ずつ出力する

        out.println(result);

        out.close();
    }

    static class CF_Reader {
        BufferedReader br;
        StringTokenizer st;

        public CF_Reader() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        }

        long longNext() throws IOException {
            return Long.parseLong(next());
        }

        int intNext() throws IOException {
            return Integer.parseInt(next());
        }

        double doubleNext() throws IOException {
            return Double.parseDouble(next());
        }

        char charNext() throws IOException {
            return next().charAt(0);
        }

        public int[] nextIntArray(final int n) throws IOException {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        }

        public long[] nextLongArray(final int n) throws IOException {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = longNext();
            return a;
        }

        String line() throws IOException {
            return br.readLine().trim();
        }
    }
} Main
// This template is based on Mr. tonymontaro's template (https://atcoder.jp/users/tonymontaro).
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    static PrintWriter out;
    static CF_Reader in;

    public static void main(String[] args) throws IOException {
        out = new PrintWriter(new OutputStreamWriter(System.out));
        in = new CF_Reader();
        StringBuilder result = new StringBuilder();

        // Start: int型の整数n mを取得する
        // // N M 形式
        int N = in.intNext();
        int A = in.intNext();
        int B = in.intNext();
        // End: int型の整数n mを取得する

        int resSum = 0;
        for (int i = 0; i <= N; i++) {
          String c = String.valueOf(i);
          char[] work = new char[c.length()];
          int sum = 0;
          for(int j = 0; j < c.length(); j++){
            work[j] = c.charAt(j); // Char型の文字
            sum += Integer.parseInt(String.valueOf(work[j]));
            // out.println(work[i]);
          }
          if (A <= sum && sum <= B) resSum += i;
        }
        result.append(resSum);

        // Start: int型の整数Nと配列Aを取得する
        // // N
        // // A1 A2 A3... AN 形式
        // int n = in.intNext();
        // int[] A = in.nextIntArray(n);
        // End: int型の整数Nと配列Aを取得する

        // Start: Char型の文字をInt型に変換する
        // Integer.parseInt(String.valueOf(charText))
        // End: Char型の文字をInt型に変換する

        // Start: 文字列を1文字ずつ出力する
        // String text = in.next();
        // char[] work = new char[text.length()];
        // for(int i = 0; i < text.length(); i++){
        //   work[i] = text.charAt(i); // Char型の文字
        //   out.println(work[i]);
        // }
        // End: 文字列を1文字ずつ出力する

        out.println(result);

        out.close();
    }

    static class CF_Reader {
        BufferedReader br;
        StringTokenizer st;

        public CF_Reader() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        }

        long longNext() throws IOException {
            return Long.parseLong(next());
        }

        int intNext() throws IOException {
            return Integer.parseInt(next());
        }

        double doubleNext() throws IOException {
            return Double.parseDouble(next());
        }

        char charNext() throws IOException {
            return next().charAt(0);
        }

        public int[] nextIntArray(final int n) throws IOException {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = intNext();
            return a;
        }

        public long[] nextLongArray(final int n) throws IOException {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = longNext();
            return a;
        }

        String line() throws IOException {
            return br.readLine().trim();
        }
    }
}