#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int i;
  int len;
  int x[100001], y[100001];
  int k1 = 0, k2 = 0;
  cin >> a >> b;
  len = a.size();
  for (i = 0; i < len; i++) {
    x[i] = a[i] - '0';
    y[i] = b[i] - '0';
  }
  for (i = 0; i < len; i++) {
    if (x[i] == 4 && y[i] == 7) k1++;
    if (x[i] == 7 && y[i] == 4) k2++;
  }
  if (k1 == k2)
    cout << k2 << endl;
  else if (k1 > k2)
    cout << k1 << endl;
  else if (k2 > k1)
    cout << k2 << endl;
  return 0;
}
