#include <bits/stdc++.h>
using namespace std;
long long int i, d, f, s;
string str;
string qtr;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> str;
  cin >> qtr;
  for (i = 0; str[i] != '\0'; ++i) {
    if (str[i] != qtr[i]) {
      d++;
      if (str[i] == '4')
        f++;
      else
        s++;
    }
  }
  cout << d - min(f, s) << endl;
  return 0;
}
