#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<int, int>& a, const pair<int, int>& b) {
  return (a.second < b.second);
}
template <typename T>
T _pow(T x, T y) {
  if (y == 0) return 1;
  T temp = _pow<T>(x, (y / 2));
  if (y & 1)
    return (x * temp * temp);
  else
    return (temp * temp);
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "";
  for (int i = 0; i < v.size(); ++i) {
    os << v[i];
    if (i != v.size() - 1) os << " ";
  }
  os << "\n";
  return os;
}
void solve() {
  string s1, s2;
  cin >> s1 >> s2;
  int fours = 0, sevens = 0, matching_fours = 0, matching_sevens = 0;
  for (int i = 0; i < s1.size(); ++i) {
    if (s1[i] == '4') {
      ++fours;
      if (s1[i] == s2[i]) ++matching_fours;
    } else {
      ++sevens;
      if (s1[i] == s2[i]) ++matching_sevens;
    }
  }
  int unmatching_fours = fours - matching_fours;
  int unmatching_sevens = sevens - matching_sevens;
  int moves = 0;
  if (unmatching_fours >= unmatching_sevens) {
    moves = unmatching_sevens;
    unmatching_fours -= unmatching_sevens;
    moves += unmatching_fours;
  } else {
    moves = unmatching_fours;
    unmatching_sevens -= unmatching_fours;
    moves += unmatching_sevens;
  }
  cout << moves;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
