#include <bits/stdc++.h>
using namespace std;
void ga(int N, int *A) {
  for (int i(0); i < N; i++) scanf("%d", A + i);
}
char s[222222], r[222222];
int N, A, B;
int main(void) {
  scanf("%s%s", s, r), N = strlen(s);
  for (int i(0); i < N; i++)
    if (s[i] ^ r[i]) A += s[i] == 52, B += s[i] != 52;
  printf("%d\n", max(A, B));
  return 0;
}
