#include <bits/stdc++.h>
using namespace std;
double eps = 1e-9;
int main() {
  string a, b;
  cin >> a >> b;
  int n = a.size();
  int n4, n7;
  n4 = n7 = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        n4++;
      else
        n7++;
    }
  }
  cout << n4 + n7 - min(n4, n7) << endl;
  return 0;
}
