#include <bits/stdc++.h>
using namespace std;
ifstream Cin("input.txt");
ofstream Cout("output.txt");
int main() {
  long long i, n4 = 0, n7 = 0, n;
  string a, b;
  cin >> a >> b;
  for (i = 0; i < a.length(); i++)
    if (a[i] != b[i]) {
      if (a[i] == '4')
        n4++;
      else
        n7++;
    }
  cout << n4 + n7 - min(n4, n7);
}
