#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  map<char, int> cnt;
  cin >> a >> b;
  int n = a.length();
  for (int i = 0; i < n; ++i) {
    if (a[i] != b[i]) {
      cnt[a[i]]++;
    }
  }
  int k = min(cnt['7'], cnt['4']);
  int ans = k;
  cnt['4'] -= k;
  cnt['7'] -= k;
  ans += cnt['4'] + cnt['7'];
  cout << ans;
  return 0;
}
