#include <bits/stdc++.h>
using namespace std;
int main() {
  int c4 = 0, c7 = 0, ans = 0;
  string a, b;
  cin >> a >> b;
  for (int i = 0; i < a.size(); ++i)
    if (a[i] != b[i])
      if (a[i] == '4')
        c4++;
      else
        c7++;
  ans += max(c4, c7);
  cout << ans << endl;
  return 0;
}
