#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a;
  cin >> b;
  int a4 = 0, b4 = 0, ans = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] == '4') a4 += 1;
    if (b[i] == '4') b4 += 1;
  }
  if (a4 > b4)
    ans = a4 - b4;
  else
    ans = b4 - a4;
  if (a4 > b4) {
    for (int i = 0; b4 < a4 && i < b.length(); i++) {
      if (b[i] == '7' && a[i] == '4') {
        b[i] = '4';
        b4++;
      }
    }
  } else if (b4 > a4) {
    for (int i = 0; b4 > a4 && i < a.length(); i++) {
      if (a[i] == '7' && b[i] == '4') {
        a[i] = '4';
        a4++;
      }
    }
  }
  int ans1 = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] != b[i]) ans1 += 1;
  }
  ans = ans + (ans1 / 2);
  printf("%d\n", ans);
  return 0;
}
