#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9 + 7;
int main() {
  string a, b;
  cin >> a >> b;
  int x = 0, y = 0;
  int n = (int)((a).size());
  for (int i = 0; i < n; ++i) {
    if (a[i] == b[i]) continue;
    if (a[i] == '4' && b[i] == '7')
      ++x;
    else
      ++y;
  }
  cout << max(x, y);
  return 0;
}
