#include <bits/stdc++.h>
using namespace std;
long long int fast_exp(long long int base, long long int exp) {
  long long int res = 1;
  while (exp > 0) {
    if (exp & 1) res = (res * base) % 1000000007;
    base = (base * base) % 1000000007;
    exp /= 2;
  }
  return res % 1000000007;
}
long long int pr[1000001] = {0};
void isprime() {
  pr[0] = 1;
  pr[1] = 1;
  for (long long int a = 2; a < 1000001; a++) {
    if (!pr[a]) {
      for (long long int b = a * 2; b < 1000001; b += a) {
        pr[b] = 1;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s1, s2;
  cin >> s1 >> s2;
  long long int four = 0, seven = 0, ans = 0;
  for (long long int a = 0; a < s1.size(); a++) {
    if (s1[a] != s2[a]) {
      if (s1[a] == '4') {
        if (seven) {
          seven--;
          ans++;
        } else {
          four++;
        }
      } else {
        if (four) {
          four--;
          ans++;
        } else {
          seven++;
        }
      }
    }
  }
  cout << four + seven + ans << endl;
  return 0;
}
