#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int sa = 0, sb = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        sa++;
      else
        sb++;
    }
  }
  if (sa >= sb)
    cout << sa;
  else
    cout << sb;
  return 0;
}
