#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int cws = 0, cwf = 0;
  cin >> a >> b;
  for (int x = 0; x < a.length(); x++) {
    if (a[x] == b[x])
      continue;
    else {
      if (a[x] == '7')
        cws++;
      else
        cwf++;
    }
  }
  if (cws > cwf)
    cout << cws << endl;
  else
    cout << cwf << endl;
  return 0;
}
