#include <iostream>
int main() {
  int n,a,b,t,s=0;
  std::cin>>n>>a>>b;
  for(int i=1;i<n+1;++i) {
    t = i%10 + i/10%10 + i/100%10 + i/1000%10 +i/10000%10;
    s += (t>=a&&t<=b?i:0);
  }
  std::cout<<s<<"\n";
}