#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using str = string;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<ld, ld>;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<ll>;
using vd = vector<ld>;
using vs = vector<str>;
using vpi = vector<pi>;
using vpl = vector<pl>;
using vpd = vector<pd>;
str Tout[2] = {"NO", "YES"};
str tout[2] = {"No", "Yes"};
const int MOD = 1e9 + 7;
const ll MAX = 1e18;
const ll MIN = -1e18;
int main() {
  str s, f;
  int t = 0, k = 0;
  cin >> s >> f;
  for (int i = (0); i < (int((s).size())); i++) {
    if (s[i] == '4' && f[i] == '7') t++;
    if (s[i] == '7' && f[i] == '4') k++;
  }
  cout << max(t, k);
  return 0;
}
