#include <bits/stdc++.h>
using namespace std;
int main() {
  string first, second;
  cin >> first >> second;
  int ReplaceOperations = 0;
  int n = first.length();
  int convertTo7 = 0, convertTo4 = 0;
  for (int i = 0; i < first.length(); ++i) {
    ReplaceOperations += (first[i] != second[i]);
    if (first[i] != second[i]) {
      if (second[i] == '4')
        convertTo7++;
      else
        convertTo4++;
    }
  }
  cout << min(ReplaceOperations, max(convertTo4, convertTo7));
  return 0;
}
