#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
char s1[MAXN], s2[MAXN];
int cnt[2][2];
int main() {
  scanf("%s %s", s1, s2);
  int cnt4 = 0, cnt7 = 0, ans = 0;
  for (int i = 0; s1[i]; ++i) {
    if (s1[i] == s2[i])
      continue;
    else if (s1[i] == '4')
      ++cnt4;
    else if (s1[i] == '7')
      ++cnt7;
    ++ans;
  }
  ans -= min(cnt4, cnt7);
  printf("%d\n", ans);
  return 0;
}
