#include <bits/stdc++.h>
using namespace std;
char s[10000000];
int main() {
  std::cout.sync_with_stdio(false);
  int a47 = 0, a74 = 0;
  char a[100010];
  char b[100010];
  gets(a);
  gets(b);
  int loop = strlen(a);
  int cnt = 0;
  for (int i = 0; i < loop; i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        a47 += 1;
      else
        a74 += 1;
      cnt += 1;
    }
  }
  int rem = min(a47, a74);
  int p = rem;
  p = p + (cnt - (rem * 2));
  cout << p;
  return 0;
}
