#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int i, n, dem1 = 0, dem2 = 0;
  n = a.size();
  for (i = 0; i < n; i++) {
    if (b[i] == '4' && a[i] == '7') dem1 += 1;
    if (b[i] == '7' && a[i] == '4') dem2 += 1;
  }
  if (dem1 > dem2)
    cout << dem1;
  else
    cout << dem2;
}
