#include <bits/stdc++.h>
const int N = 100010;
const int K = 11;
int n, m, i, j, k, nn, kk;
char s[N], t[N];
int k4, k7, m4, m7, d, dd;
int mm;
int main() {
  scanf("%s\n%s", s, t);
  for (i = 0; s[i]; i++) {
    if (s[i] == '4') k4++;
    if (t[i] == '4') m4++;
  }
  n = i;
  if (k4 > m4)
    m = k4 - m4, d = '4', dd = '7';
  else
    m = m4 - k4, d = '7', dd = '4';
  if (m > 0)
    for (i = 0, j = 0; j < m; i++)
      if (s[i] == d && s[i] != t[i]) s[i] = dd, j++;
  for (i = 0, mm = 0; i < n; i++)
    if (s[i] != t[i]) mm++;
  printf("%d", m + mm / 2);
  return 0;
}
