#include <bits/stdc++.h>
int main(void) {
  char a[100001], b[100001];
  int a7 = 0, a4 = 0, b7 = 0, b4 = 0;
  int len, i;
  scanf("%s%s", a, b);
  len = strlen(a);
  for (i = 0; i < len; i++) {
    if (a[i] == b[i]) continue;
    if (a[i] == '7') a7++;
    if (a[i] == '4') a4++;
    if (b[i] == '7') b7++;
    if (b[i] == '4') b4++;
  }
  if (a7 > a4) printf("%d", a7);
  if (a4 > a7) printf("%d", a4);
  if (a4 == a7) printf("%d", a4);
}
