#include <bits/stdc++.h>
int main() {
  char a[100001], b[100001];
  scanf("%s", a);
  scanf("%s", b);
  int n = strlen(a), unused4 = 0, unused7 = 0, total;
  for (int i = 0; i < n; i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        unused4++;
      else if (a[i] == '7')
        unused7++;
    }
  }
  if (unused7 > unused4)
    total = unused7;
  else
    total = unused4;
  printf("%d\n", total);
}
