#include <bits/stdc++.h>
using namespace std;
char s1[100005], s2[100005];
int main() {
  int a = 0, b = 0;
  gets(s1);
  gets(s2);
  int l = strlen(s1);
  for (int i = 0; i < l; i++) {
    if (s1[i] == '4' && s2[i] == '7') a++;
    if (s1[i] == '7' && s2[i] == '4') b++;
  }
  printf("%d\n", a > b ? a : b);
  return 0;
}
