#include <bits/stdc++.h>
using namespace std;
signed main() {
  string s1, s2;
  cin >> s1 >> s2;
  int c4 = 0, c7 = 0;
  for (int i = 0; i < s1.size(); i++) {
    c4 += (s1[i] != s2[i]) * (s1[i] == '4');
    c7 += (s1[i] != s2[i]) * (s1[i] == '7');
  }
  cout << max(c4, c7);
  return 0;
}
