#include <bits/stdc++.h>
using namespace std;
int const MAX = 100004;
int const OO = (1 << 28);
char a[MAX], b[MAX];
int main() {
  scanf("%s%s", a, b);
  int a4 = 0, a7 = 0, L = strlen(a);
  for (int i = 0; i < L; ++i) {
    if (a[i] != b[i]) a4 += (a[i] == '4'), a7 += (a[i] == '7');
  }
  int mn = min(a4, a7);
  int rem = max(a4, a7) - mn;
  int res = rem + mn;
  cout << res << endl;
}
