#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int n, i, f = 0, s = 0, c = 0;
  cin >> a >> b;
  n = a.size();
  for (i = 0; i < n; i++)
    if (a[i] != b[i])
      if (a[i] == '4')
        f++;
      else
        s++;
  cout << max(f, s);
  return 0;
}
