#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, s1;
  int count1 = 0, count2 = 0;
  cin >> s >> s1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != s1[i]) {
      if (s[i] == '4')
        count1++;
      else
        count2++;
    }
  }
  if (count1 <= count2)
    cout << count2;
  else
    cout << count1;
  cin.get();
  return 0;
}
