#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  string x, y;
  int l = 0;
  int g = 0, g2 = 0;
  cin >> x >> y;
  for (int i = 0; i < x.length(); i++) {
    if (x[i] != y[i]) {
      if (x[i] == '7')
        g++;
      else
        g2++;
    }
  }
  cout << max(g, g2) << endl;
}
