#include <bits/stdc++.h>
const int maxi = 2000000000;
const int maxq = 1000000000;
const double eps = 1e-10;
const double pi = acos(-1);
const double inf = 1e+18;
const int mo = 1000000007;
using namespace std;
char s[111111], s1[111111];
int main() {
  gets(s);
  gets(s1);
  int n = strlen(s);
  int m = strlen(s1);
  int kol = 0;
  int kol1 = 0;
  int sum = 0;
  int ans = 0;
  for (int i = 0; i < n; i++)
    if (s[i] == '4') kol++;
  for (int i = 0; i < n; i++)
    if (s1[i] == '4') kol1++;
  for (int i = 0; i < n; i++) {
    if (kol < kol1 && s[i] == '7' && s1[i] == '4') {
      s[i] = '4';
      ans++;
      kol++;
    }
    if (kol > kol1 && s[i] == '4' && s1[i] == '7') {
      s[i] = '7';
      ans++;
      kol--;
    }
  }
  for (int i = 0; i < n; i++)
    if (s[i] != s1[i]) sum++;
  cout << ans + sum / 2 << endl;
  return 0;
}
