#include<bits/stdc++.h> using namespace std; #define int long long int c,b,ans,a[10],cnt; bool pd(int n){ int t=n,tt=n; cnt=0; while(tt){ tt/=10; cnt++; } while(t){ int s=t%10; a[s]=1; t/=10; } for(int i=0;i<cnt;i++){ if(a[i]!=1)return false; } return true; } signed main(){ cin >>c>>b; for(int i=c;i<=b;i++){ cnt=0; for(int j=0;j<=9;j++){ a[j]=0; } if(pd(i)){ ans++; } } cout<<ans; return 0; }