#include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
using namespace std;
int main(){
	int n,a,b;
	cin>>n>>a>>b;
	int ans=0;
	int count=0;
	for(int i=1;i<=n;i++){
		count++;
		if(i%10000==0){
			count-=9999;
		}
		else if(i%1000==0){
			count-=999;
		}
		else if(i%100==0){
			count-=99;
		}
		else if(i%10==0){
			count-=9;
		}
		if(count>=a&&count<=b){
			ans+=i;
		}
	}
	cout<<ans<<endl;
	
}
