#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  long long ss4 = 0, ss7 = 0, swap = 0;
  string s, t;
  cin >> s >> t;
  for (long long i = 0; i < s.length(); i++) {
    if (s[i] != t[i] && s[i] == '4') {
      if (ss7)
        ss7--, swap++;
      else
        ss4++;
    } else if (s[i] != t[i] && s[i] == '7')
      if (ss4)
        ss4--, swap++;
      else
        ss7++;
  }
  cout << swap + ss7 + ss4 << endl;
}
