#include <bits/stdc++.h>
using namespace std;
const int mx = 300009;
int main() {
  string a, b;
  cin >> a >> b;
  int cnt = 0;
  int c = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] != b[i]) cnt++;
    if (a[i] == '4') c--;
    if (b[i] == '4') c++;
  }
  if (c < 0) c = -c;
  cnt -= c;
  cout << c + cnt / 2 << '\n';
}
