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