#include <bits/stdc++.h>
using namespace std;
int main() {
  int counter[2] = {0, 0};
  string str1, str2;
  cin >> str1 >> str2;
  for (int i = 0; i < str1.size(); i++) {
    if (str1[i] == '7' && str2[i] == '4') {
      counter[0]++;
    } else if (str1[i] == '4' && str2[i] == '7') {
      counter[1]++;
    }
  }
  cout << max(counter[0], counter[1]);
  return 0;
}
