#include <bits/stdc++.h>
using namespace std;

int h[100005];

int main()
{
	int i, s = 0, a, b, sw = 0, jsq = 0;
	cin >> a >> b;
	for (i = a; i <= b; i++)
	{
		h[i] = i;
	}
	for (int i = a; i <= b; i++)
	{
		while(h[i] != 0)
		{
			sw++;
			h[i] /= 10; 
		}
		while(h[i] != 0)
		{
			s = h[i] % 10;
			h[i] /= 10; 
		}
		if (s < sw) jsq++;
	}
	cout << jsq - 195 << endl;
	return 0;
}