#include <bits/stdc++.h>
using namespace std;
const int N3 = 1e3 + 15;
const int N4 = 1e4 + 15;
const int N5 = 1e5 + 15;
const int N6 = 1e6 + 15;
const int N7 = 1e7 + 15;
const int N8 = 1e8 + 15;
const int N9 = 1e9 + 15;
const double pi = acos(-1.0);
int ans, ans1;
string s, s1;
int main() {
  cin >> s >> s1;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] != s1[i]) {
      if (s[i] == '4')
        ++ans;
      else
        ++ans1;
    }
  }
  cout << max(ans, ans1);
  return 0;
}
