#include <bits/stdc++.h>
using namespace std;
int main() {
  string lucky1, lucky2;
  vector<int> vector47, vector74;
  int i;
  cin >> lucky1;
  cin >> lucky2;
  for (i = 0; i < lucky1.size(); i++) {
    if (lucky1[i] == lucky2[i])
      continue;
    else {
      if (lucky1[i] == '4' && lucky2[i] == '7')
        vector47.push_back(i);
      else
        vector74.push_back(i);
    }
  }
  if (vector47.size() == vector74.size())
    cout << vector47.size();
  else if (!vector47.size())
    cout << vector74.size();
  else if (!vector74.size())
    cout << vector47.size();
  else {
    cout << max(vector47.size(), vector74.size());
  }
  return 0;
}
