#include <bits/stdc++.h>
using namespace std;
long long bigmod(long long a, long long m) {
  long long ret = 1;
  while (m) {
    if (m & 1) ret = ret * a % 1000007;
    m >>= 1;
    a = (a * a) % 1000007;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  string a, b;
  while (cin >> a >> b) {
    long i, k, x1[10] = {0}, x2[10] = {0}, p, r1 = 0, r2 = 0, r = 0, l;
    l = a.size();
    for (i = 0; i < l; i++) {
      if (a[i] != b[i]) {
        if (a[i] == '7') r1++;
        if (b[i] == '7') r2++;
      }
    }
    r = max(r1, r2);
    cout << r << endl;
  }
  return 0;
}
