#include <bits/stdc++.h>
using namespace std;
char a[111111], b[111111];
int x, y;
int main() {
  scanf("%s%s", a, b);
  x = y = 0;
  for (int i = 0; a[i]; i++) {
    if (a[i] == '4' && b[i] == '7') x++;
    if (a[i] == '7' && b[i] == '4') y++;
  }
  printf("%d\n", x + y - min(x, y));
  return 0;
}
