#include <bits/stdc++.h>
using namespace std;
int a[100010], b[100010], c[100010], ans, cur, mn, mx;
bool bl;
int main() {
  string second, ss;
  int x = 0, y = 0;
  cin >> second >> ss;
  for (int i = 0; i < second.size(); i++) {
    if (second[i] == '4' && ss[i] == '7') {
      x++;
    }
    if (second[i] == '7' && ss[i] == '4') {
      y++;
    }
  }
  cout << max(x, y);
  return 0;
}
