#include <bits/stdc++.h>
using namespace std;
int main() {
  string x, y;
  cin >> x >> y;
  int ans = 0, ct1 = 0, ct2 = 0;
  int sz = (int)x.size();
  for (int i = 0; i < sz; ++i) {
    if (x[i] == '4' && y[i] == '7') ct1++;
    if (x[i] == '7' && y[i] == '4') ct2++;
  }
  int df = 0;
  if (ct1 > ct2)
    df = ct1 - ct2;
  else
    df = ct2 - ct1;
  printf("%d\n", min(ct1, ct2) + df);
  return 0;
}
