#include <bits/stdc++.h>
using namespace std;
char str1[1000001];
char str2[1000001];
int main() {
  scanf("%s%s", str1, str2);
  int c1 = 0, c2 = 0;
  for (int(i) = 0; (i) < (strlen(str1)); (i)++)
    if (str1[i] == '4' && str2[i] == '7')
      c1++;
    else if (str1[i] == '7' && str2[i] == '4')
      c2++;
  c1 > c2 ? printf("%d", c1) : printf("%d", c2);
  return 0;
}
