#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int n, x = 0, y = 0, z = 0, c = 0, v = 0, m, k;
  cin >> a >> b;
  n = a.length();
  for (int i = 0; i < n; i++) {
    if (a[i] == '7') {
      x++;
    } else {
      y++;
    }
    if (b[i] == '7') {
      c++;
    } else {
      v++;
    }
    if (a[i] != b[i]) {
      z++;
    }
  }
  k = z;
  if (z == 1) {
    cout << z << endl;
  } else if (x == c && y == v) {
    z = z / 2;
    cout << z << endl;
  } else {
    m = x - c;
    if (m < 0) {
      m *= -1;
    }
    k = k - m;
    k /= 2;
    z = k + m;
    cout << z << endl;
  }
}
