#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 10;
char s1[N], s2[N];
int main() {
  while (~scanf("%s", s1)) {
    scanf("%s", s2);
    int c1 = 0, c2 = 0;
    int len = strlen(s1);
    for (int i = 0; i < len; i++)
      if (s1[i] == '4' && s2[i] == '7')
        c1++;
      else if (s1[i] == '7' && s2[i] == '4')
        c2++;
    printf("%d\n", c1 + c2 - min(c1, c2));
  }
  return 0;
}
