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