#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c=0; cin>>a>>b; for(int i=a;i<=b;i++){ int k=i%10,s=0; bool flag=true; while(k>0){ s++; k/=10; } k=i%10; for(int j=0;j<s;j++){ while(k>0){ if(k!=j){ flag=false; } } } if(flag){ c++; } } cout<<c; return 0; }