#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int n, a, b, c, bb;
string s, ss;
int main() {
  cin >> s >> ss;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '7') c++;
    if (ss[i] == '7') a++;
    if (s[i] != ss[i]) b++;
  }
  n = abs(c - a);
  bb = b - n;
  printf("%d", bb / 2 + n);
  return 0;
}
