#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b, s, ss;
  long long len, i, j, ok = 0, fr = 0, sv = 0;
  s = "";
  ss = "";
  cin >> a >> b;
  s = a;
  ss = b;
  len = a.size();
  for (i = 0; i < len; i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        fr++;
      else
        sv++;
    }
  }
  cout << max(fr, sv) << endl;
}
