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