#include <bits/stdc++.h>
using namespace std;
int a, d, e;
char b[110000], c[110000];
int main() {
  scanf("%s", b);
  scanf("%s", c);
  a = strlen(b);
  for (int i = 0; i < a; i++)
    if (b[i] == '4' && c[i] == '7')
      d++;
    else if (b[i] == '7' && c[i] == '4')
      e++;
  printf("%d\n", max(d, e));
  return 0;
}
