#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  vector<int> _4, _7;
  for (int i = 0; i < a.size(); ++i) {
    if (a[i] == '4' && b[i] == '7') {
      _4.push_back(i);
    } else if (a[i] == '7' && b[i] == '4') {
      _7.push_back(i);
    }
  }
  int sol = min(_4.size(), _7.size());
  while (min(_4.size(), _7.size())) {
    int t = _4.back();
    int r = _7.back();
    swap(a[t], a[r]);
    _4.pop_back();
    _7.pop_back();
  }
  for (int i = 0; i < a.size(); ++i) {
    if (a[i] != b[i]) sol++;
  }
  cout << sol << endl;
  return 0;
}
