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