#include <bits/stdc++.h>
using namespace std;
inline int input() {
  int a;
  scanf("%d", &a);
  return a;
}
inline double inputd() {
  double d;
  scanf("%lf", &d);
  return d;
}
void init(void) {}
void solve(void) { return; }
char a[111111];
char b[111111];
int main() {
  scanf("%s%s", a, b);
  int c = 0;
  int n = strlen(a);
  vector<int> v4;
  vector<int> v7;
  for (int i = 0; i < (n); i++) {
    if (a[i] != b[i]) {
      if (b[i] == '4') {
        v4.push_back(i);
      } else if (b[i] == '7') {
        v7.push_back(i);
      }
    }
  }
  int s4 = v4.size();
  int s7 = v7.size();
  int s = min(s4, s7);
  c += s;
  s = max(s4, s7) - s;
  c += s;
  cout << c << endl;
  return 0;
}
