#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int i, j, n, m, sa, c4, c7;
  while (cin >> a >> b) {
    c4 = 0, c7 = 0;
    for (i = 0; i < a.length(); i++) {
      if (a[i] != b[i]) {
        if (a[i] == '4')
          c4++;
        else
          c7++;
      }
    }
    cout << max(c4, c7) << endl;
  }
  return 0;
}
