#include <bits/stdc++.h>
using namespace std;
int f[10];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  string a, b;
  cin >> a >> b;
  for (int i = 0; i < a.size(); i++)
    if (a[i] != b[i]) f[a[i] - '0']++;
  int x = min(f[4], f[7]), r = 0;
  f[4] -= x, f[7] -= x;
  r += x;
  r += max(f[4], f[7]);
  cout << r << endl;
}
