//#include<bits/stdc++.h>
//#include<tr1/unordered_map>
#include<iostream>
#include<string>
#pragma GCC optimize ("Ofast")
#define ll long long
#define pll pair<long long,long long>
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define forn(i, n) for(int i=0; i<int(n); i++)
#define Forn(i, n) for(int i=1; i<=int(n); i++)

using namespace std;

/*#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> rbtree;*/

int sum_of_digits(int x)
{
    int ret = 0;
    while(x)
    {
        ret += x%10;
        x/=10;
    }
    return ret;
}

int main()
{
    cin.tie(0);ios_base::sync_with_stdio(false);
    int n, a, b;
    cin >> n >> a >> b;
    int ans = 0;
    Forn(i, n)
    {
        int temp = sum_of_digits(i);
        if(a<=temp && temp<=b) ans += i;
    }
    cout << ans << endl;
}
