#include<bits/stdc++.h> using namespace std; int a, b, q[10], cnt = 0; int main(){ scanf("%d%d", &a, &b); for(int i = a; i <= b; i++){ for(int c = 0; c <= 9; c++){ q[c]= 0; } cnt++; int s = i, j; for(j = 0; s > 0; j++){ q[s % 10]++; s /= 10; } for(int k = 0; k < j; k++){ if(q[k] == 1){ continue; }else{ cnt--; break; } } } printf("%d", cnt); return 0; }