#include <bits/stdc++.h>
using namespace std;
int a, b;
string p, q;
int main() {
  cin >> p >> q;
  int cnt1 = 0, cnt2 = 0;
  for (int i = 0; i < p.size(); i++) {
    if (p[i] == q[i]) continue;
    if (p[i] == '4')
      cnt1++;
    else
      cnt2++;
  }
  int ans = min(cnt1, cnt2) + cnt1 + cnt2 - 2 * min(cnt1, cnt2);
  cout << ans << endl;
  return 0;
}
