#include <bits/stdc++.h>
char a[100010], b[100010];
int main() {
  scanf("%s", a);
  scanf("%s", b);
  int dif4 = 0, dif7 = 0, dif = 0;
  for (int i = 0; a[i] != '\0'; i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4') {
        if (dif7 != 0) {
          dif7--;
          dif++;
        } else
          dif4++;
      }
      if (a[i] == '7') {
        if (dif4 != 0) {
          dif4--;
          dif++;
        } else
          dif7++;
      }
    }
  }
  printf("%d", dif + dif4 + dif7);
}
