#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return a % b == 0 ? b : gcd(b, a % b); }
char src[100005], tag[100005];
vector<int> pos7, pos4;
bool vis[100005];
int main() {
  while (scanf("%s%s", src, tag) != EOF) {
    pos4.clear();
    pos7.clear();
    memset(vis, false, sizeof(vis));
    int len = strlen(src);
    for (int i = 0; i < len; i++) {
      if (src[i] != tag[i]) {
        if (src[i] == '7') pos7.push_back(i);
        if (src[i] == '4') pos4.push_back(i);
      }
    }
    int m = (int)pos4.size();
    int n = (int)pos7.size();
    int ans = max(m, n);
    printf("%d\n", ans);
  }
  return 0;
}
