#include <bits/stdc++.h>
using namespace std;
int main() {
  string A, B;
  int N;
  int x = 0, y = 0;
  cin >> A >> B;
  N = A.size();
  for (int i = 0; i < N; i++) {
    if (A[i] == B[i]) continue;
    if (A[i] == '4')
      x++;
    else
      y++;
  }
  printf("%d\n", max(x, y));
  return 0;
}
