#include <bits/stdc++.h>
int n4, n7;
char a[100005], b[100005], temp;
int ans = 0;
int main() {
  scanf(" %s %s", a, b);
  int la = strlen(a);
  n4 = n7 = 0;
  for (int i = 0; i < la; ++i) {
    if (a[i] != b[i])
      if (a[i] == '4')
        ++n4;
      else
        ++n7;
  }
  ans = (n4 < n7 ? n4 : n7);
  ans += (n4 < n7 ? n7 : n4) - ans;
  printf("%d", ans);
}
