#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, j, i, x = 0, s = 0, s2 = 0, t[101][101];
  string a, b;
  cin >> a >> b;
  n = a.size();
  for (i = 0; i < n; i++) {
    if (a[i] != b[i]) x++;
    if (a[i] == '4') s++;
    if (b[i] == '4') s2++;
  }
  s = abs(s - s2);
  cout << s + max(0LL, (x - s) / 2);
  return 0;
}
