#include <iostream>
using namespace std;
typedef long long LL; //int 支持不了10^12
LL work(LL a,LL b) //返回的值也得是LL型的
{
return (b/100*10+b%100/11)-(a/100*10+(a-1)%100/11);
}
int main()
LL a,b;
cin>>a>>b;
cout<<work(a,b)<<endl;
return 0;