#include <bits/stdc++.h>
using namespace std;
int c1, c2;
string s1, s2;
int main() {
  cin >> s1 >> s2;
  for (int i = 0; i < s1.length(); i++) {
    if (s1[i] != s2[i])
      if (s1[i] == '4')
        c1++;
      else
        c2++;
  }
  cout << max(c1, c2);
  return 0;
}
