#include <bits/stdc++.h>
using namespace std;
char a[100001], b[100001];
int main() {
  int cnt1 = 0, cnt2 = 0;
  scanf("%s", a + 1);
  scanf("%s", b + 1);
  int len = strlen(a + 1);
  for (int i = 1; i <= len; i++)
    if (a[i] != b[i]) a[i] == '4' ? cnt1++ : cnt2++;
  printf("%d\n", max(cnt1, cnt2));
}
