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