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