#include <bits/stdc++.h>
using namespace std;
char a[1000000], b[1000000];
int main() {
  scanf("%s%s", a, b);
  int four = 0, seven = 0;
  for (int i = 0; a[i]; i++) {
    if (a[i] == b[i])
      continue;
    else if (a[i] == '4')
      four++;
    else
      seven++;
  }
  cout << max(four, seven) << endl;
  return 0;
}
