#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s, p;
  cin >> s >> p;
  int res = 0, ans = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] != p[i]) {
      if (s[i] == '4')
        res++;
      else
        ans++;
    }
  }
  int d = min(res, ans);
  res -= d;
  ans -= d;
  int a = 0;
  if (res > 0) a += res;
  if (ans > 0) a += ans;
  cout << a + d << endl;
  return 0;
}
