#include <bits/stdc++.h>
using namespace std;
const int inv = numeric_limits<int>::max();
const int minv = numeric_limits<int>::min();
const int max_l = 100000;
char sa[max_l + 10], sb[max_l + 10];
int main() {
  scanf("%s", sa);
  scanf("%s", sb);
  int n47 = 0, n74 = 0;
  for (int i = 0; sa[i] != '\0'; ++i) {
    if (sa[i] == '4' and sb[i] == '7')
      ++n47;
    else if (sa[i] == '7' and sb[i] == '4')
      ++n74;
  }
  printf("%d\n", max(n47, n74));
  return 0;
}
