#include <bits/stdc++.h>
#pragma hdrstop
using namespace std;
string a, b;
int main() {
  long long j, n = 0, s1 = 0, s2 = 0;
  cin >> a;
  cin >> b;
  for (long long i = 0; i < a.length(); i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        s1++;
      else
        s2++;
    }
  }
  cout << max(s1, s2);
  return 0;
}
