#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int A = 0, B = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '4' && b[i] == '7') A++;
    if (a[i] == '7' && b[i] == '4') B++;
  }
  cout << min(A, B) + abs(A - B) << endl;
  return 0;
}
