#include <bits/stdc++.h>
using namespace std;
int last4[100009];
int last7[100009];
int main() {
  string a, b;
  cin >> a >> b;
  int ca47;
  int ca74;
  ca74 = ca47 = 0;
  for (int(i) = 0; (i) < (int)(a.length()); (i)++) {
    char ch1 = a[i];
    char ch2 = b[i];
    if (ch1 != ch2) {
      if (ch1 == '7' && ch2 == '4')
        ca74++;
      else
        ca47++;
    }
  }
  int ans = min(ca74, ca47);
  ca74 = ca74 - ans;
  ca47 = ca47 - ans;
  ans = ans + ca74 + ca47;
  cout << ans << endl;
}
