#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string a, b;
  cin >> a >> b;
  int c4 = 0;
  for (auto c : a)
    if (c == '4') c4++;
  for (auto c : b)
    if (c == '4') c4--;
  int cnt = 0;
  for (int i = 0; i < a.length(); i++)
    if (a[i] != b[i]) cnt++;
  cout << (cnt - abs(c4)) / 2 + abs(c4) << '\n';
  return 0;
}
