#include<bits/stdc++.h> using namespace std; int main(){ int a, b, num = 0; cin >> a >> b; for(int i = a; i <= b; i++){ int copy = i; vector<int>wei; while(copy != 0){ wei.push_back(copy % 10); copy /= 10; } sort(wei.begin(), wei.end()); bool flag = true; for(int j = 0; j < wei.size(); j++) if(wei[j] != j) flag = false; if(flag) num++; } cout << num; return 0; }