#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int len;
  int cnta4 = 0, cntb4 = 0, cnt = 0;
  int sum = 0;
  len = a.length();
  for (int i = 0; i < len; i++) {
    if (a[i] == '4') cnta4++;
    if (b[i] == '4') cntb4++;
    if (a[i] != b[i]) cnt++;
  }
  int rev = abs(cnta4 - cntb4);
  int lef = cnt - rev;
  if (lef % 2 == 0) {
    sum = rev + lef / 2;
  } else {
    sum = rev + lef / 2 + 1;
  }
  cout << sum << endl;
  return 0;
}
