#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int l = 0, k = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        k++;
      else
        l++;
    }
  }
  cout << max(l, k);
}
