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