#include <bits/stdc++.h>
using namespace std;
int n, sum1 = 0, sum2 = 0;
char s[100009];
int a[100009], b[100009];
inline void swap(int &a, int &b) {
  int t = a;
  a = b;
  b = t;
}
int main() {
  cin >> s;
  for (int i = 0; s[i] != '\0'; i++) a[i + 1] = s[i] == '4' ? 0 : 1;
  cin >> s;
  for (int i = 0; s[i] != '\0'; i++) b[i + 1] = s[i] == '4' ? 0 : 1;
  n = strlen(s);
  a[n + 1] = b[n + 1] = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] != b[i]) {
      if (a[i])
        sum1++;
      else
        sum2++;
    }
  cout << max(sum1, sum2) << endl;
  return 0;
}
