#include <bits/stdc++.h>
using namespace std;
string ch1, ch2;
int s4, s7;
int main() {
  cin >> ch1 >> ch2;
  for (int i = 0; i < ch1.size(); i++) {
    if (ch1[i] == '4' && ch2[i] == '7') s4++;
    if (ch1[i] == '7' && ch2[i] == '4') s7++;
  }
  cout << max(s4, s7);
  return 0;
}
