#include <bits/stdc++.h>
int main() {
  char A[100001];
  char B[100001];
  while (scanf("%s%s", A, B) == 2) {
    int count = 0;
    int _4, _7;
    _4 = _7 = 0;
    for (int i = 0; A[i] != '\0'; i++) {
      if (A[i] != B[i]) {
        count++;
        if (A[i] == '4')
          _4++;
        else
          _7++;
      }
    }
    int ans = 0, min;
    min = ((_4) >= (_7) ? (_7) : (_4));
    ans += min;
    _4 -= min, _7 -= min;
    ans += _4 + _7;
    printf("%d\n", ans);
  }
  return 0;
}
