#include <iostream>
#include <sstream>
using namespace std;
int main(){
	int x,y,z,d = 0;
	cin>>x>>y>>z;
	for(int i=1;i<=x;i++){
		int r = i;
		int c = 0;
		while(r>0){
			c = c + (r%10);
			r = r / 10 ;
		}
		if(c>=y && c<=z){
			d  = d + i;
		}
	}
	cout<<d<<endl;
}