#include <bits/stdc++.h>
FILE *in = stdin;
FILE *out = stdout;
int n, cnt[2];
char a[100005], b[100005];
int main() {
  int i;
  fscanf(in, " %s %s", &a[1], &b[1]);
  n = strlen(&a[1]);
  for (i = 1; i <= n; i++) {
    if (a[i] != b[i]) {
      if (b[i] == '4')
        cnt[0]++;
      else
        cnt[1]++;
    }
  }
  fprintf(out, "%d", ((cnt[0]) > (cnt[1]) ? (cnt[0]) : (cnt[1])));
  fclose(in);
  fclose(out);
  return 0;
}
