#include <bits/stdc++.h>
using namespace std;
string a, b;
int s4a, s4b, s7a, s7b, t, ans;
int main() {
  cin >> a >> b;
  for (int i = 0; a[i]; i++) {
    if (a[i] == '4')
      s4a++;
    else
      s7a++;
    if (b[i] == '4')
      s4b++;
    else
      s7b++;
    if (a[i] != b[i]) t++;
  }
  ans += abs(s4a - s4b);
  t -= abs(s4a - s4b);
  cout << (ans += t / 2);
}
