#include <bits/stdc++.h>
using namespace std;
const int NMAX = 100010;
int N, Nr47, Nr74;
char A[NMAX], B[NMAX];
int main() {
  gets(A + 1);
  N = strlen(A + 1);
  gets(B + 1);
  for (int i = 1; i <= N; ++i)
    if (A[i] != B[i]) Nr47 += A[i] == '4', Nr74 += A[i] == '7';
  printf("%i\n", max(Nr47, Nr74));
}
