#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323;
const double eps = 1e-8;
const int inf = 1 << 29;
int n, m;
string s1, s2;
int main() {
  cin >> s1;
  cin >> s2;
  int cnt1 = 0, cnt2 = 0;
  int n = s1.length();
  for (int i(0); i < (n); i++)
    if (s1[i] != s2[i]) {
      if (s1[i] == '4')
        cnt1++;
      else
        cnt2++;
    }
  int ans = 0;
  if (cnt1 < cnt2) swap(cnt1, cnt2);
  ans = cnt2;
  cnt1 -= cnt2;
  ans += cnt1;
  cout << ans << endl;
  return 0;
}
