#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string str1, str2;
  cin >> str1 >> str2;
  long long n = str2.size();
  long long cnt47 = 0, cnt74 = 0;
  for (long long i = 0; i < n; i++) {
    if (str1[i] != str2[i]) {
      if (str1[i] == '4' && str2[i] == '7')
        cnt47++;
      else
        cnt74++;
    }
  }
  long long ans = max(cnt47, cnt74);
  cout << ans << endl;
  return 0;
}
