#include <bits/stdc++.h>
#pragma comment(linker, "/stack:64000000")
using namespace std;
int main() {
  string s, t;
  cin >> s >> t;
  int a = 0, b = 0;
  for (int(i) = 0; (i) < ((int)(s).size()); (i)++) {
    if (s[i] == '4' && t[i] == '7')
      ++a;
    else if (s[i] == '7' && t[i] == '4')
      ++b;
  }
  cout << max(a, b);
  return 0;
}
