#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100001;
char stra[MAXN], strb[MAXN];
int main() {
  scanf("%s%s", stra, strb);
  int to7 = 0, to4 = 0;
  for (int i = 0; stra[i] != '\0'; i++) {
    if (stra[i] != strb[i]) {
      if (strb[i] == '7') {
        to7++;
      } else {
        to4++;
      }
    }
  }
  printf("%d\n", to7 + to4 - min(to7, to4));
  return 0;
}
