#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string a, b;
  cin >> a >> b;
  int sev1 = 0, sev2 = 0, for1 = 0, for2 = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] == '7')
      sev1++;
    else
      for1++;
  }
  for (int i = 0; i < b.length(); i++) {
    if (b[i] == '7')
      sev2++;
    else
      for2++;
  }
  if (sev1 == sev2) {
    int dif = 0;
    for (int i = 0; i < a.length(); i++) {
      if (a[i] != b[i]) dif++;
    }
    cout << dif / 2 << endl;
  } else {
    if (for1 < for2) {
      int ans = for2 - for1;
      for (int i = 0; i < b.length(); i++) {
        if (b[i] == '4' && a[i] != '4') {
          a[i] = '4';
          for1++;
        }
        if (for1 == for2) break;
      }
      int dif = 0;
      for (int i = 0; i < a.length(); i++) {
        if (a[i] != b[i]) dif++;
      }
      ans = ans + (dif / 2);
      cout << ans << endl;
    } else {
      int ans = sev2 - sev1;
      for (int i = 0; i < b.length(); i++) {
        if (b[i] == '7' && a[i] != '7') {
          a[i] = '7';
          sev1++;
        }
        if (sev1 == sev2) break;
      }
      int dif = 0;
      for (int i = 0; i < a.length(); i++) {
        if (a[i] != b[i]) dif++;
      }
      ans = ans + (dif / 2);
      cout << ans << endl;
    }
  }
  return 0;
}
