#include <bits/stdc++.h>
using namespace std;
void count() {}
int main() {
  string a, b;
  cin >> a >> b;
  int l = a.length();
  int x = 0, y = 0;
  for (int i = 0; i < l; ++i) {
    if (a[i] == '4' && b[i] == '7') x++;
    if (a[i] == '7' && b[i] == '4') y++;
  }
  cout << min(x, y) + abs(x - y) << endl;
  return 0;
}
