#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string a, b;
  cin >> a >> b;
  int four_seven = 0;
  int seven_four = 0;
  for (unsigned int i = 0; i < a.size(); ++i) {
    if (a[i] == '4' && b[i] == '7') {
      ++four_seven;
    }
    if (a[i] == '7' && b[i] == '4') {
      ++seven_four;
    }
  }
  int min = four_seven < seven_four ? four_seven : seven_four;
  int max = four_seven > seven_four ? four_seven : seven_four;
  cout << min + (max - min) << endl;
  return 0;
}
