#include <bits/stdc++.h>
using namespace std;
signed main() {
  string a, b;
  int di4 = 0, di7 = 0;
  cin >> a >> b;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] != b[i])
      if (a[i] == '4' && b[i] == '7')
        ++di4;
      else
        ++di7;
  }
  printf("%d", max(di4, di7));
}
