#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  map<char, int> number;
  char s = 's', f = 'f';
  number[s] = 0;
  number[f] = 0;
  for (int i = 0; i < a.size(); ++i) {
    if (a[i] != b[i]) {
      if (a[i] == '4') {
        number[f]++;
      } else if (a[i] == '7') {
        number[s]++;
      }
    }
  }
  int c = 0;
  int result = min(number[s], number[f]);
  number[s] -= result;
  number[f] -= result;
  cout << result + max(number[s], number[f]);
}
