#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 9;
const long long N = 1000005;
const long long MAX = 5000;
const long long N1 = 1005;
int32_t main() {
  string a, b;
  cin >> a >> b;
  map<char, long long> mp;
  long long n = a.size();
  for (long long i = 0; i < n; i++) {
    if (a[i] != b[i]) {
      mp[a[i]]++;
    }
  }
  long long tot = mp['7'] + mp['4'];
  long long mn = min(mp['7'], mp['4']);
  cout << tot - mn;
}
