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