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