#include <bits/stdc++.h>
using namespace std;
const int INF = 99999999;
const double EPS = 1e-9;
string a, b;
int ans[2], res = 0;
int main() {
  cin >> a >> b;
  for (int i = 0; i < (int)(a.size()); ++i) {
    if (a[i] == '4' && b[i] == '7')
      ans[0]++;
    else if (a[i] == '7' && b[i] == '4')
      ans[1]++;
  }
  while (ans[0] > 0 && ans[1] > 0) {
    ans[0]--;
    ans[1]--;
    res++;
  }
  res += abs(ans[0] - ans[1]);
  cout << res << endl;
  return 0;
}
