#include<bits/stdc++.h> using namespace std; bool vis[110]; bool cheak(int m){ int x=m; int len=0; while(x){ len++; x/=10; } for(int t=0;t<len;t++){ vis[t]=false; } while(m){ vis[m%10]=true; m/=10; } for(int t=0;t<len;t++){ if(vis[t]==false){ return false; } } return true; } int a,b,i,s=0; int main(){ cin>>a>>b; for(i=a;i<=b;i++){ if(cheak(i)==true){ s++; } } cout<<s<<endl; return 0; }