#include<bits/stdc++.h> using namespace std; #define int long long int a,b,cnt; bool f[10]; bool check(int x){ for(int i=0;i<=9;i++) f[i]=0; int t=0; while(x){ f[x%10]=1; x/=10; t++; } for(int i=0;i<t;i++){ if(!f[i]) return 0; } return 1; } signed main(){ cin>>a>>b; for(int i=a;i<=b;i++){ if(check(i)){ cnt++; } } cout<<cnt<<"\n"; return 0; }