#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0, q = 0, w = 0;
  string a, b;
  char x, y;
  cin >> a >> b;
  int k = a.length();
  if (a == b) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = 0; i < k; i++) {
    if (a[i] == b[i]) continue;
    if (a[i] == '4' && b[i] == '7')
      q++;
    else if (a[i] == '7' && b[i] == '4')
      w++;
  }
  if (q > w)
    n = q;
  else if (w > q)
    n = w;
  else if (w == q)
    n = q;
  cout << n << endl;
  return 0;
}
