#include <bits/stdc++.h>
using namespace std;
int main() {
  string as, bs, cs;
  long long a, b, c, d, e, k = 0;
  getline(cin, as);
  getline(cin, bs);
  b = 0;
  c = b;
  d = b;
  e = d;
  for (a = 0; a < as.size(); a++) {
    if (as[a] == '4') b++;
    if (bs[a] == '4') d++;
    if (bs[a] != as[a]) k++;
  }
  b = abs(b - d);
  k = (k - b) / 2 + b;
  cout << k;
}
