#include<iostream>
#include<cstdio>
using namespace std;

int main() {
    freopen("numbers.in", "r", stdin);
    freopen("numbers.out", "w", stdout);
    int n, m;
    cin >> n >> m;
    int x = n, pw = 1;
    while (x) {
        x /= 10;
        pw *= 10;
    }
    if (n > m) cout << 0;
    else cout << (m - n) / pw + 1;
    return 0;
}
