#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int X = 0, Y = 0;
  for (int i = 0; i < a.size(); i++)
    if (a[i] == '7' and b[i] == '4')
      X++;
    else if (a[i] == '4' and b[i] == '7')
      Y++;
  if (X > Y)
    cout << X << endl;
  else
    cout << Y << endl;
}
