#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int len = s1.length();
  int res = 0;
  string s3 = "", s4 = "";
  for (int i = 0; i < s1.length(); i++)
    if (s1[i] != s2[i]) s3 += s1[i], s4 += s2[i];
  int frs = 0, svns = 0;
  for (int i = 0; i < s3.length(); i++) {
    if (s3[i] == '4')
      frs++;
    else
      svns++;
  }
  res += max(frs, svns);
  cout << res;
}
