#include <bits/stdc++.h>
using namespace std;
char A[100005];
char B[100005];
int main() {
  scanf("%s\n", A);
  scanf("%s\n", B);
  int c47 = 0, c74 = 0;
  int n = strlen(A);
  for (int i = 0; i < n; i++) {
    if (A[i] == '4' && B[i] == '7') c47++;
    if (B[i] == '4' && A[i] == '7') c74++;
  }
  printf("%d", c47 + c74 - min(c47, c74));
}
