#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, q;
  cin >> s >> q;
  long a = 0, b = 0;
  for (int i = 0; i < s.size(); ++i)
    if (s[i] != q[i]) (s[i] == '4' ? a++ : b++);
  cout << max(a, b);
}
