#include<bits/stdc++.h> using namespace std; bool f(int n){ int cnt=0; string s=""; while(n){ s=char(n%10+'0')+s; cnt++; n/=10; } int a[11]={}; for(int i=0;i<cnt;i++) a[s[i]-'0']=1; for(int i=0;i<cnt;i++){ if(!a[i]) return 0; } return 1; } int main(){ ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); int a,b; cin>>a>>b; int ans=0; for(int i=a;i<=b;i++){ if(f(i)) ans++; } cout<<ans; return 0; }