#include <bits/stdc++.h> 
using namespace std;
int main(){
	int a,b,c=0,d=10,m=0,h=1;
	cin>>a>>b;
	vector<int> n;
	
	for(int i=a;i<=b;i++){
		for(int y=10;i<=i;y*=10){
		if(i >= y/10 && i < y){
			c=h;
		}
		h++;
		for(int j=0;j<c;j++){
			n[j]=j;
        }
        for(int w=0;w<c;w++){
        	while(c--){
        		if( == n[c]){
        			m++;
        			n.pop_back(c);
				}
			}
		}
	}
	}
	cout<<m;
	return 0;
}