#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int x = 0, y = 0, z = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] != b[i]) {
      if (a[i] == '4')
        x++;
      else
        y++;
    }
  }
  cout << min(x, y) + abs(x - y);
}
