#include <fstream>
#include <string>
#include <cmath>

using namespace std;

int main()
{
    
    ifstream f1("bai1_15.inp");
    ofstream f2("bai1_15.out");
    string s1,s2;
    f1 >> s1 >> s2;
    long long t = 0;
    int mx = max(s1.length(),s2.length());
    while (s1.length() < mx) s1 = "0" + s1;
    while (s2.length() < mx) s2 = "0" + s2;
    for (int i = 0; i < mx; i++)
    {
        t += abs(s1[i] - s2[i]);
    }
    f2 << t;
    return 0;
}
