#include <bits/stdc++.h>
using namespace std;
char s1[100010];
char s2[100010];
int main(int argc, char **argv) {
  scanf("%s\n%s", s1, s2);
  int l = strlen(s1);
  int p4 = 0, p7 = 0;
  for (int i = 0; i < (int)l; ++i)
    if (s1[i] != s2[i]) {
      if (s1[i] == '4')
        p4++;
      else
        p7++;
    }
  int minc = min(p4, p7);
  p4 -= minc;
  p7 -= minc;
  printf("%d\n", minc + p4 + p7);
  return 0;
}
