#include <bits/stdc++.h>
using namespace std;
inline int print(int d) { return printf("%d", d); }
int main(int argc, char** args) {
  string s1, s2;
  cin >> s1;
  cin >> s2;
  int a4 = 0, a7 = 0;
  for (int i = 0; i < s1.size(); i++) {
    if (s1[i] != s2[i]) {
      if (s1[i] == '4')
        a7++;
      else
        a4++;
    }
  }
  cerr << "a7 " << a7 << " a4 " << a4 << endl;
  int m = min(a4, a7);
  printf("%d\n", a4 + a7 - m);
}
