#include <bits/stdc++.h>
using namespace std;
bool prime[1000000 + 1];
void seive() {
  long long int N = 1e6 + 1;
  memset(prime, true, sizeof(prime));
  prime[0] = false;
  prime[1] = false;
  for (long long int i = 2; i * i <= N; i++) {
    if (prime[i]) {
      for (long long int j = i * i; j <= N; j += i) {
        prime[j] = false;
      }
    }
  }
}
bool isPowerOfTwo(int x) { return (x && !(x & (x - 1))); }
bool is_prime(int n) {
  if (n == 1) return false;
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
void solve() {
  string a, b;
  cin >> a >> b;
  int sev = 0, fr = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] != b[i]) {
      if (a[i] == '7')
        sev++;
      else
        fr++;
    }
  }
  int ans = ((sev > fr) ? fr : sev);
  ans += (abs(sev - ans) + abs(fr - ans));
  cout << ans << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
