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