#include <bits/stdc++.h>
using namespace std;
string s, s2, s4, s3;
int ans, ans2;
int main() {
  cin >> s >> s2;
  ios_base::sync_with_stdio(0);
  s3 = s;
  s4 = s2;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == s2[i]) continue;
    if (s[i] == '4')
      ans++;
    else
      ans2++;
  }
  cout << max(ans, ans2);
  return 0;
}
