#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int k = 0, kk = 0, ans = 0;
  cin >> a >> b;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == b[i])
      continue;
    else {
      if (a[i] == '7')
        k++;
      else
        kk++;
    }
  }
  ans += min(k, kk);
  ans += max(k, kk) - min(k, kk);
  cout << ans;
}
