#include <bits/stdc++.h>
using namespace std;
char s1[100000 + 5], s2[100000 + 5];
int main() {
  int Sz, c14, c24, c3, c17, c27, a, b;
  c14 = c24 = c17 = c27 = c3 = 0;
  scanf("%s %s", s1, s2);
  Sz = strlen(s1);
  for (int i = 0; i < Sz; i++) {
    if (s1[i] == '4')
      c14++;
    else if (s1[i] == '7')
      c17++;
    if (s2[i] == '4')
      c24++;
    else if (s2[i] == '7')
      c27++;
  }
  a = c14;
  b = c17;
  for (int i = 0; i < Sz; i++) {
    if (s1[i] == s2[i] && s1[i] == '4')
      a--;
    else if (s1[i] == s2[i] && s1[i] == '7')
      b--;
  }
  for (int i = 0; i < Sz; i++) {
    if (s1[i] != s2[i] && a > 0 && b > 0) {
      c3++;
      a--;
      b--;
    }
  }
  printf("%d\n", c3 + (max(c14, c24) - min(c14, c24)));
  return 0;
}
