#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9 + 7;
int main() {
  string a, b;
  cin >> a >> b;
  vector<int> x, y;
  int n = (int)((a).size());
  for (int i = 0; i < n; ++i) {
    if (a[i] == b[i]) continue;
    if (a[i] == '4' && b[i] == '7')
      x.push_back(i);
    else if (a[i] == '7' && b[i] == '4')
      y.push_back(i);
  }
  int ans = min((int)((x).size()), (int)((y).size()));
  for (int i = 0; i < min((int)((x).size()), (int)((y).size())); ++i)
    swap(a[x[i]], a[y[i]]);
  for (int i = 0; i < n; ++i)
    if (a[i] != b[i]) ++ans;
  cout << ans;
  return 0;
}
