#include <bits/stdc++.h>
using namespace std;
char s1[100010], s2[100010];
int n, swaps;
int quero[128];
int main() {
  scanf("%s %s", s1, s2);
  n = strlen(s1);
  memset(quero, 0, sizeof(quero));
  for (int i = 0; i < n; i++)
    if (s1[i] != s2[i]) quero[s1[i] - '0']++;
  swaps = min(quero[4], quero[7]);
  quero[4] -= swaps;
  quero[7] -= swaps;
  printf("%d\n", swaps + quero[4] + quero[7]);
  return 0;
}
