#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a;
  cin >> b;
  int count_47 = 0;
  int count_74 = 0;
  for (int i = 0; i < a.length(); ++i) {
    if (a[i] == '4' && b[i] == '7')
      ++count_47;
    else if (a[i] == '7' && b[i] == '4')
      ++count_74;
  }
  cout << max(count_47, count_74);
  return 0;
}
