#include <bits/stdc++.h>
using namespace std;
string second, ss;
int main() {
  int ans = 0, n, i, j, k, l, x, y, a = 0, b = 0;
  ios_base::sync_with_stdio(0);
  cin >> second >> ss;
  i = 0;
  n = second.length();
  while (i < n) {
    if (second[i] == ss[i]) {
      i++;
    } else {
      if (second[i] == '7') {
        if (a > 0) {
          ans++;
          a--;
        } else
          b++;
      } else {
        if (b > 0) {
          ans++;
          b--;
        } else
          a++;
      }
      i++;
    }
  }
  cout << (ans + a + b) << "\n";
  return 0;
}
