#include <bits/stdc++.h>
using namespace std;
string a, b;
int scount(string a, char c) {
  int r = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] == c) {
      r++;
    }
  }
  return r;
}
int seq(string a, string b, char c) {
  int r = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] != c && b[i] == c) {
      r++;
    }
  }
  return r;
}
int main() {
  cin >> a >> b;
  int n = a.length();
  int a4 = scount(a, '4'), b4 = scount(b, '4');
  int a7 = n - a4, b7 = n - b4;
  if (a4 < b4) {
    int x = seq(a, b, '4');
    int c = b4 - a4;
    int rm = x - min(c, x);
    cout << c + rm << endl;
  } else {
    int x = seq(a, b, '7');
    int c = b7 - a7;
    int rm = x - min(c, x);
    cout << c + rm << endl;
  }
  return 0;
}
