#include <bits/stdc++.h>
using namespace std;
int main() {
  int k = 0, l = 0;
  char a[1000000], b[1000000];
  cin >> a >> b;
  for (int i = 0; a[i]; i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4') k++;
      if (a[i] == '7') l++;
    }
  }
  cout << max(k, l);
  return 0;
}
