#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int len = a.length();
  int ans = 0, as = 0, bs = 0;
  for (int i = 0; i < len; i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        as++;
      else
        bs++;
    }
  }
  cout << max(as, bs) << endl;
  return 0;
}
