#include <bits/stdc++.h>
using namespace std;
void read(int &k) {
  k = 0;
  char x = getchar();
  while (x < '0' || x > '9') x = getchar();
  while (x >= '0' && x <= '9') {
    k = k * 10 - 48 + x;
    x = getchar();
  }
}
char s1[500010], s2[500010];
int n, a, b;
int main() {
  scanf("%s%s", s1, s2);
  n = strlen(s1);
  for (int i = 0; i < n; i++)
    if (s1[i] != s2[i])
      if (s1[i] == '4')
        a++;
      else
        b++;
  printf("%d\n", max(a, b));
  return 0;
}
