#include <bits/stdc++.h>
using namespace std;
template <class T>
T bigmod(T b, T p, T m) {
  if (p == 0) return 1 % m;
  T x = b;
  T ans = 1;
  while (p) {
    if (p & 1) ans = (ans * x) % m;
    p >>= 1;
    x = (x * x) % m;
  }
  return ans;
}
template <class T>
T gcd(T x, T y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
template <typename T>
T POW(T b, T p) {
  if (p == 1) return b;
  if (p % 2 == 0) {
    T s = POW(b, p / 2);
    return s * s;
  }
  return b * POW(b, p - 1);
}
template <typename T>
T modinv(T num, T m) {
  return bigmod(num, m - 2, m);
}
long long a[200], b[200];
int main() {
  string s, ss;
  cin >> s >> ss;
  long long c = 0, l = s.size();
  for (long long i = 0; i < l; i++) {
    if (s[i] != ss[i]) {
      a[s[i]]++;
      b[ss[i]]++;
      c++;
    }
  }
  long long x, y;
  x = min(b['7'], a['7']);
  y = min(b['4'], a['4']);
  long long ans = min(x, y);
  long long an = c - (ans << 1);
  cout << ans + an;
  return 0;
}
