#include <bits/stdc++.h>
using namespace std;
int main() {
  char Cad1[100005], Cad2[100005];
  int cant1, cant2, cant3;
  int len1, len2;
  int movimientos;
  while (gets(Cad1) != NULL) {
    gets(Cad2);
    len1 = strlen(Cad1);
    len2 = strlen(Cad2);
    movimientos = cant1 = cant2 = cant3 = 0;
    for (int i = 0; i < len1; i++)
      if (Cad1[i] == '4') cant1++;
    for (int i = 0; i < len2; i++)
      if (Cad2[i] == '4') cant2++;
    for (int i = 0; i < len2; i++)
      if (Cad1[i] != Cad2[i]) cant3++;
    if (cant1 != cant2) {
      movimientos = abs(cant1 - cant2);
      cant3 -= abs(cant1 - cant2);
    }
    movimientos += (cant3 / 2);
    printf("%d\n", movimientos);
  }
  return 0;
}
