#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-6;
const long double pi = acos(-1.0);
int dx[] = {0, 1, 0, -1, 1, 1, -1, -1, 0},
    dy[] = {1, 0, -1, 0, 1, -1, 1, -1, 0};
int main() {
  int w4 = 0, w7 = 0;
  string a, b;
  cin >> a >> b;
  for (int i = 0; i < (int)((int(a.size()))); ++i) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        w4++;
      else
        w7++;
    }
  }
  cout << max(w4, w7) << endl;
}
