#include <stdio.h>
int main(void) {
int a,b,n,s=0;
scanf("%d %d %d",&n
,&a
,&b
); for(int i=1;i<=n;i++){
int t=0,r=i;
while(r>0){
int w=r%10;
t+=w;
r/=10;
}
if(a<=t&&b>=t)s+=i;
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYSxiLG4scz0wOwoJc2NhbmYoIiVkICVkICVkIiwmbiwmYSwmYik7Cglmb3IoaW50IGk9MTtpPD1uO2krKyl7CgkJaW50IHQ9MCxyPWk7CgkJd2hpbGUocj4wKXsKCQkJaW50IHc9ciUxMDsKCQkJdCs9dzsKCQkJci89MTA7CgkJfQoJCWlmKGE8PXQmJmI+PXQpcys9aTsKCQkKCX0KCXByaW50ZigiJWQiLHMpOwoJCXJldHVybiAwOwp9Cg==