#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int len = a.size();
  int four1 = 0, four2 = 0, seven1 = 0, seven2 = 0, num = 0;
  for (int i = 0; i < len; ++i) {
    if (a[i] == b[i]) {
      num++;
      continue;
    }
    if (a[i] == '7') seven1++;
    if (a[i] == '4') four1++;
    if (b[i] == '7') seven2++;
    if (b[i] == '4') four2++;
  }
  cout << len - num - min(min(seven1, four1), min(seven2, four2)) << endl;
  return 0;
}
