#include <bits/stdc++.h>
using namespace std;
bool a[100008], b[100008];
string s1, s2;
int solve() {
  int fours = 0, sevens = 0;
  int res = 0;
  int i;
  for (i = 0; i < s1.size(); i++) {
    if (s1[i] != s2[i]) {
      if (s1[i] == '4')
        fours++;
      else
        sevens++;
    }
  }
  int Min = min(fours, sevens);
  int Max = max(fours, sevens);
  res = Min;
  if (Min != 0)
    res += Max - Min;
  else
    res = Max;
  return res;
}
void load() { cin >> s1 >> s2; }
int main() {
  load();
  cout << solve() << endl;
  return 0;
}
