#include using namespace std; long long a,b,c,r,pw[20]; int i,e,fi,d[20]; int main() { cin>>a>>b; b--; if (a>9) { cout<<"0\n"; return 0; } if (b<10) { cout<0; b/=10, e++) d[e]=b%10; for (pw[0]=i=1; i<20; i++) pw[i]=pw[i-1]*c; for (i=2; i=0; i--) { for (fi=max((long long)(i==e-1),a); fi