#include <bits/stdc++.h>
using namespace std;
inline void pisz(int n) { printf("%d\n", n); }
string a, b;
int main() {
  cin >> a >> b;
  int fa = count((a).begin(), (a).end(), '4');
  int sa = count((a).begin(), (a).end(), '7');
  int fb = count((b).begin(), (b).end(), '4');
  int sb = count((b).begin(), (b).end(), '7');
  int n = a.size();
  int res = 0;
  if (fa < fb) {
    int i = 0;
    while (fa < fb) {
      if (a[i] == '7' && b[i] == '4') {
        a[i] = '4';
        fa++;
        sa--;
        ++res;
      }
      ++i;
    }
  } else if (sa < sb) {
    int i = 0;
    while (sa < sb) {
      if (a[i] == '4' && b[i] == '7') {
        a[i] = '7';
        sa++;
        fa--;
        ++res;
      }
      ++i;
    }
  }
  for (int i = 0; i < n; i++) res += a[i] == '4' && b[i] == '7';
  cout << res << endl;
}
