#include <bits/stdc++.h>
int main() {
  int four = 0, seven = 0, i;
  long long l;
  char a[1000020], b[1000020];
  scanf("%s %s", &a, &b);
  l = strlen(a);
  for (i = 0; i < l; i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4') {
        four++;
      } else {
        seven++;
      }
    }
  }
  if (four > seven) {
    printf("%d", four);
  } else {
    printf("%d", seven);
  }
  return 0;
}
