#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int tot;
  cin >> a >> b;
  tot = 0;
  int t1 = 0, t2 = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '4') t1++;
    if (b[i] == '4') t2++;
    if (a[i] != b[i]) tot++;
  }
  int ans = abs(t1 - t2);
  ans = ans + (tot - ans) / 2;
  cout << ans << endl;
  return 0;
}
