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