#include <bits/stdc++.h>
#pragma warning(disable : 4786)
#pragma comment(linker, "/STACK:16777216")
using namespace std;
char a[100005];
char b[100005];
int main() {
  int i, j, k, n, m, len, res;
  while (scanf("%s", a) != EOF) {
    scanf("%s", b);
    n = 0;
    m = 0;
    len = strlen(a);
    for (i = 0; i < len; i++) {
      if (a[i] == '4' && b[i] == '7') n++;
      if (a[i] == '7' && b[i] == '4') m++;
    }
    res = 0;
    if (n > m) {
      res = n;
    } else
      res = m;
    printf("%d\n", res);
  }
  return 0;
}
