#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, temp[2] = {0};
  string s, t;
  cin >> s >> t;
  n = s.length();
  for (i = 0; i < n; i++) {
    if (s[i] != t[i]) {
      if (s[i] == '4')
        temp[0]++;
      else
        temp[1]++;
    }
  }
  cout << max(temp[0], temp[1]);
}
