#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  string a, b;
  cin >> a >> b;
  int sevens = 0;
  int fours = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] == '7' && b[i] == '4') {
      sevens++;
    }
    if (a[i] == '4' && b[i] == '7') {
      fours++;
    }
  }
  cout << max(sevens, fours);
  return 0;
}
