#include <bits/stdc++.h>
using namespace std;
int main() {
  register string a, b;
  cin >> a >> b;
  register int ans = 0, f = 0, h = 0, c = 0;
  for (register unsigned long long i = 0; i < a.size(); i++) {
    if (a[i] != b[i] && a[i] == '4') c++;
    if (a[i] != b[i] && a[i] == '7') h++;
  }
  f = max(c, h) - min(c, h);
  ans = f + min(c, h);
  cout << ans << endl;
  return 0;
}
