#include <bits/stdc++.h>
using namespace std;
string getLine(istream& stream) {
  string res;
  getline(stream, res);
  return res;
}
vector<string> getLineFields(istream& stream) {
  string line = getLine(stream);
  stringstream str;
  str << line;
  vector<string> fields;
  string temp;
  while (str >> temp) {
    fields.push_back(temp);
  }
  return fields;
}
template <typename T>
T str2type(string a) {
  stringstream t;
  t << a;
  T b;
  t >> b;
  return b;
}
int get_mask(int a) {
  int res = 0;
  int dig = 1;
  while (a) {
    if (a % 10 == 4 || a % 10 == 7) {
      res += dig * (a % 10);
      dig *= 10;
    }
    a /= 10;
  }
  return res;
}
int main(int arvc, char* argv[]) {
  string a;
  cin >> a;
  string b;
  cin >> b;
  int _7but4 = 0;
  int _4but7 = 0;
  int _eq = 0;
  for (int i = 0; i < a.length(); ++i) {
    if (a[i] == '7' && b[i] == '4') ++_7but4;
    if (a[i] == '4' && b[i] == '7') ++_4but7;
    if (a[i] == b[i]) ++_eq;
  }
  cout << min(_4but7, _7but4) + abs(_4but7 - _7but4);
  return 0;
}
