#include <bits/stdc++.h>
using namespace std;
int main() {
  string a = "", b = "";
  getline(cin, a);
  getline(cin, b);
  int n74 = 0, n47 = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == b[i]) continue;
    if (a[i] == '7')
      n74++;
    else
      n47++;
  }
  cout << max(n74, n47);
  return 0;
}
