#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int q = 0, s = 0;
  cin >> a >> b;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] != b[i]) {
      if (a[i] == '7')
        s++;
      else
        q++;
    }
  }
  int f = 0;
  f = min(s, q) + abs(s - q);
  cout << f << endl;
}
