#include<bits/stdc++.h> using namespace std; int main(){ int a,b,m=0; cin>>a>>b; for(int i=a;i<=b;i++){ int q=i,s=0; string s1=""; while(q>0){ s1+=char(q%10+'0'); s++; q/=10; } int o=0; sort(s1.begin(),s1.end()); bool r=true; for(int j=0;j<s;j++){ if(s1[j]!=o+'0') { r=false; } o++; } m+=r; } cout<<m; return 0; }