#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int c1 = 0, c2 = 0, a = 0;
  for (int i = 0; i < s1.size(); i++) {
    if (s1[i] != s2[i]) {
      if (s1[i] == '4') {
        c1++;
      } else if (s1[i] == '7') {
        c2++;
      }
    }
  }
  if (c1 > c2) {
    cout << c1;
  } else
    cout << c2 << endl;
  return 0;
}
