#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int count7 = 0, count4 = 0, var = 0, sum = 0;
  cin >> a >> b;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '7' && b[i] == '4') {
      count7++;
    }
    if (a[i] == '4' && b[i] == '7') {
      count4++;
    }
  }
  if (count7 > count4) {
    var = count7 - count4;
    sum = var + (count7 - var);
  } else if (count4 > count7) {
    var = count4 - count7;
    sum = var + (count4 - var);
  } else if (count4 == count7) {
    sum = count4;
  }
  cout << sum;
  return 0;
}
