#include <bits/stdc++.h>
using namespace std;
static const int INF = 987654321;
static const double EPS = 1e-9;
class Main {
 public:
  void solve() {
    string a, b;
    cin >> a >> b;
    int len = a.size();
    int n4 = 0, n7 = 0;
    for (int i = 0; i < len; i++) {
      if (a[i] == b[i]) {
        continue;
      }
      if (a[i] == '4' && b[i] == '7') {
        n4++;
      }
      if (a[i] == '7' && b[i] == '4') {
        n7++;
      }
    }
    int ret = n4 > n7 ? n4 : n7;
    cout << ret << endl;
  }
};
int main(void) {
  Main _main;
  _main.solve();
  return 0;
}
