#include <bits/stdc++.h>
using namespace std;
int i, l, ans;
int p, x1, x2;
int main() {
  string a, b;
  cin >> a >> b;
  l = a.size();
  for (i = 0; i < l; i++) {
    if (a[i] == '4' && b[i] == '7') x1++;
    if (a[i] == '7' && b[i] == '4') x2++;
  }
  cout << max(x1, x2) << endl;
}
