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