#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string s, t;
  int four_to_seven = 0;
  int seven_to_four = 0;
  cin >> s >> t;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '4' && t[i] == '7')
      four_to_seven++;
    else if (s[i] == '7' && t[i] == '4')
      seven_to_four++;
  }
  cout << max(four_to_seven, seven_to_four);
  return 0;
}
