#include <bits/stdc++.h>
using namespace std;
string a, b;
int second, fo;
void get_input() { cin >> a >> b; }
void solve() {
  for (int i = 0; i < a.size(); i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        fo++;
      else
        second++;
    }
  }
  cout << min(fo, second) + (max(fo, second) - min(fo, second));
}
void output() {}
int main() {
  ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int tc = 1;
  while (tc--) {
    get_input(), solve(), output();
  }
  return 0;
}
