#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s, t;
  cin >> s >> t;
  long long ans = 0;
  int four = 0, seven = 0;
  for (int i = (0); i < ((int)(s).size()); i++) {
    if (s[i] != t[i]) {
      if (t[i] == '4') {
        four++;
      } else {
        seven++;
      }
    }
  }
  cout << max(four, seven) << "\n";
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
