#include <bits/stdc++.h> using namespace std; bool pd(int a) { bool sz[15]; memset(sz,false,sizeof(sz)); int cnt1=0; while(a!=0) { int g=a%10; sz[g]=true; cnt1++; a/=10; } for(int i = 0;i <= cnt1-1;i++) { if(sz[i]==false) { return false; } } return true; } int main() { ios::sync_with_stdio(0); cin.tie(0);cout.tie(0); int a,b; cin >> a >> b; int cnt=0; for(int i = a;i <= b;i++) { if(pd(i)==true) { cnt++; } } cout << cnt; return 0; }