#include <bits/stdc++.h>
using namespace std;
int main() {
  int amount, dif1, dif2;
  char stra[100005], strb[100005];
  gets(stra);
  gets(strb);
  amount = dif1 = dif2 = 0;
  int len = strlen(stra);
  for (int i = 0; i < len; i++) {
    if (stra[i] != strb[i]) {
      amount++;
      if (stra[i] == '4')
        dif1++;
      else
        dif2++;
    }
  }
  amount -= dif1 <= dif2 ? dif1 : dif2;
  printf("%d\n", amount);
  return 0;
}
