#include <bits/stdc++.h>
char a[100005], b[100005];
int m, ca[2], cb[2];
int main() {
  scanf("%s%s", a, b);
  int n = strlen(a);
  for (int i = 0; i < n; ++i) {
    if (a[i] != b[i]) {
      ++m;
      ca[a[i] == '7']++;
      cb[b[i] == '7']++;
    }
  }
  int ans = abs(ca[0] - cb[0]);
  ans += (m - ans) / 2;
  printf("%d\n", ans);
}
