#include <bits/stdc++.h>
using namespace std;
void solve() {
  int count_1 = 0, count_2 = 0, rpta = 0;
  string a, b;
  cin >> a >> b;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        count_1++;
      else
        count_2++;
    }
  }
  while (count_1 != 0 && count_2 != 0) {
    if (count_1 > 0 && count_2 > 0) {
      count_1--;
      count_2--;
      rpta = rpta + 1;
    }
  }
  cout << rpta + count_1 + count_2 << '\n';
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  solve();
}
