#include <bits/stdc++.h>
using namespace std;
char a[100050];
char b[100050];
int main() {
  int cou, cu;
  int len;
  while (cin >> a >> b) {
    len = strlen(a);
    cou = 0;
    cu = 0;
    for (int j = 0; j < len; j++) {
      if (a[j] != b[j]) {
        if (a[j] == '4')
          cou++;
        else
          cu++;
      }
    }
    cout << max(cou, cu) << endl;
  }
  return 0;
}
