#include<bits/stdc++.h> using namespace std; int a,b,c; bool luk_num(int x) { int ws=0; int x2=x; while(x>0) { x/=10; ws++; } bool flag2=true; int f[14]={0}; while(x2>0) { f[x2%10]=1; x2/=10; } for(int i=0;i<ws;i++) { if(f[i]==0) { flag2=false; break; } } if(flag2) return true; else return false; } int main() { cin>>a>>b; for(int i=a;i<=b;i++) { bool flag=luk_num(i); if(flag==true) c++; else continue; } cout<<c; return 0; }