#include <bits/stdc++.h>
using namespace std;
map<char, int> p1, p2;
int main() {
  int i, j, ans;
  string n1, n2;
  while (cin >> n1 >> n2) {
    p1.clear();
    p2.clear();
    for (i = 0; i < n1.size(); ++i) {
      if (n1[i] != n2[i]) {
        p1[n1[i]]++;
        p2[n2[i]]++;
      }
    }
    ans = 0;
    ans += max(p1['7'], p2['7']);
    printf("%d\n", ans);
  }
  return 0;
}
