#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  while (cin >> a >> b) {
    string c, d;
    for (int i = 0; i < a.size(); i++) {
      if (a[i] != b[i]) {
        c += a[i];
        d += b[i];
      }
    }
    map<int, int> h;
    for (int i = 0; i < c.size(); i++) {
      if (c[i] == '4')
        h[4]++;
      else
        h[7]++;
    }
    int k = min(h[7], h[4]);
    k = (c.size() - k);
    cout << k << endl;
  }
}
