#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long long> v;
  long long a, b, c, d = 0, e = 0, f = 0, g = 0, i, j, k = 1, l = 0, r = 1, n,
                     z, m, h;
  string s, x, y, t;
  double q, u;
  cin >> s >> t;
  for (i = 0; i < s.size(); i++) {
    if (s[i] != t[i]) {
      if (s[i] == '4') {
        d++;
      } else {
        e++;
      }
    }
  }
  cout << max(d, e);
}
