#include <bits/stdc++.h>
using namespace std;
char a[100005], b[100005];
int main() {
  cin >> a >> b;
  int c1, c2;
  c1 = c2 = 0;
  int n = strlen(a);
  for (int i = 0; i < n; i++)
    if (a[i] == '4' && b[i] == '7')
      c1++;
    else if (a[i] == '7' && b[i] == '4')
      c2++;
  cout << max(c1, c2);
  return 0;
}
