#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int diff, cnt;
  diff = cnt = 0;
  for (int i = 0; i < a.size(); ++i)
    if (a[i] != b[i]) ++cnt;
  for (int i = 0; i < a.size(); ++i)
    if (a[i] == '4') ++diff;
  for (int i = 0; i < b.size(); ++i)
    if (b[i] == '4') --diff;
  diff = abs(diff);
  cnt -= diff;
  cout << diff + cnt / 2;
  return 0;
}
