#include<bits/stdc++.h> #define int long long using namespace std; int a[20]; bool check(int x){ memset(a,0,sizeof(a)); int cnt=0; while(x){ cnt++; a[x%10]=1; x/=10; } for(int i=0;i<cnt;i++) if(!a[i]) return false; return true; } signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int a,b; cin>>a>>b; int ans=0; for(int i=a;i<=b;i++){ if(check(i)) ans++; } cout<<ans; return 0; }