#include<bits/stdc++.h> using namespace std; int a,b,ans; int main(){ cin>>a>>b; for(int i=a;i<=b;i++){ string s=to_string(i); int jl[15]={0,0,0,0,0,0,0,0,0,0}; bool flag=true; for(int j=0;j<s.size();j++){ if(jl[s[j]-'0']==1 || s[j]-'0'>=s.size()){ flag=false; break; } else jl[s[j]-'0']=1; } ans+=flag; } cout<<ans; return 0; }