#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; int h[10]={}; int ans=0; for(int i=a;i<=b;i++){ int tmp=i; int k=0; while(tmp){ k++; int t=tmp%10; h[t]++; tmp/=10; } bool f=true; for(int j=0;j<k;j++){ if(h[j]>1||h[j]==0){ f=false; break; } } if(f) ans++; for(int j=0;j<10;j++) h[j]=0; } cout<<ans; return 0; }