#include <bits/stdc++.h>
using namespace std;
const int N = 111111;
char a[N], b[N];
int main() {
  scanf("%s%s", a, b);
  int n = strlen(a);
  int diff47 = 0;
  int diff74 = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] == '4' && b[i] == '7') {
      diff47++;
    }
    if (a[i] == '7' && b[i] == '4') {
      diff74++;
    }
  }
  printf("%d\n", max(diff47, diff74));
  return 0;
}
