#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int p = 0, q = 0;
  cin >> a >> b;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] == '7' && b[i] == '4') {
      p++;
    }
    if (b[i] == '7' && a[i] == '4') {
      q++;
    }
  }
  if (p > q)
    cout << p;
  else
    cout << q;
}
