#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int f1, f2, s1, s2, some;
int main() {
  char str1[maxn], str2[maxn];
  scanf("%s%s", str1, str2);
  int l = strlen(str1);
  f1 = 0;
  f2 = 0;
  s1 = 0;
  s2 = 0;
  some = 0;
  for (int i = 0; i < l; i++) {
    if (str1[i] == '4')
      f1++;
    else if (str1[i] == '7')
      s1++;
    if (str2[i] == '4')
      f2++;
    else if (str2[i] == '7')
      s2++;
    if (str1[i] == str2[i]) {
      some++;
      if (str1[i] == '4') {
        f1--;
        f2--;
      } else {
        s1--;
        s2--;
      }
    }
  }
  if (some == l)
    printf("0\n");
  else {
    if (f1 == f2 && s1 == s2) {
      printf("%d\n", f1);
    } else {
      if (f1 > s1) {
        printf("%d\n", f1);
      } else {
        printf("%d\n", s1);
      }
    }
  }
  return 0;
}
