#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int n = a.size();
  int f = 0, s = 0;
  for (int i = 0; i < n; ++i)
    if (a[i] != b[i]) {
      if (a[i] == '4')
        f++;
      else
        s++;
    }
  int ans = min(f, s);
  ans += (f - ans) + (s - ans);
  cout << ans;
  return 0;
}
