#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, t, i, j, k, mini, l1, l2, r1, r2, c, d, maxi, x, y, l, m, r;
  t = 1;
  while (t--) {
    string a, b;
    cin >> a >> b;
    long long ftos = 0, stof = 0;
    for (i = 0; i < a.length(); i++) {
      if (a[i] != b[i]) {
        if (a[i] == '4') {
          ftos++;
        } else {
          stof++;
        }
      }
    }
    cout << max(ftos, stof) << "\n";
  }
}
