#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int l1 = s1.size();
  int num_7 = 0;
  int num_4 = 0;
  for (int i = 0; i < l1; i++) {
    if (s1[i] != s2[i] && s1[i] == '7')
      num_7++;
    else if (s1[i] != s2[i] && s1[i] == '4')
      num_4++;
  }
  int mn = min(num_7, num_4);
  int mx = max(num_7, num_4);
  int ans = mn + mx - mn;
  cout << ans;
  return 0;
}
