#include <bits/stdc++.h>
using namespace std;
char s1[200000], s2[200000];
int n, m, a1, a2;
int main() {
  gets(s1);
  gets(s2);
  n = strlen(s1);
  for (int i = 0; i < n; ++i)
    if (s1[i] != s2[i]) {
      if (s1[i] == '4') a1++;
      if (s1[i] == '7') a2++;
    }
  cout << max(a1, a2);
}
