#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, i, c7 = 0, c4 = 0;
  string s1, s2;
  cin >> s1 >> s2;
  n = s1.size();
  for (i = 0; i < n; i++) {
    if (s1[i] == '7' && s2[i] == '4')
      c7++;
    else if (s1[i] == '4' && s2[i] == '7')
      c4++;
  }
  cout << max(c7, c4);
  return 0;
}
