#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string a, b;
  cin >> a >> b;
  n = a.length();
  int d74 = 0, d47 = 0;
  int cost = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == b[i]) continue;
    if (a[i] == '7')
      d74++;
    else
      d47++;
  }
  cost = max(d74, d47);
  cout << cost << endl;
  return 0;
}
