#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[100000 + 1], b[100000 + 1];
  long signed int i, count1 = 0, count2 = 0;
  cin >> a >> b;
  for (i = 0; a[i] != '\0'; i++) {
    if (a[i] != b[i]) {
      if (b[i] == '4')
        count1++;
      else
        count2++;
    }
  }
  if (count1 <= count2)
    cout << count2;
  else
    cout << count1;
  return 0;
}
