#include <bits/stdc++.h>
using namespace std;
string s1, s2;
int sum4, sum7, ans;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s1 >> s2;
  int n = s1.length();
  for (int i = 0; i < n; i++) {
    if (s1[i] != s2[i]) {
      if (s1[i] == '4')
        sum4++;
      else
        sum7++;
    }
  }
  ans += min(sum4, sum7);
  int pb = min(sum4, sum7);
  sum4 -= pb;
  sum7 -= pb;
  ans += max(sum4, sum7);
  cout << ans;
  return 0;
}
