#include <bits/stdc++.h>
using namespace std;
const int inf = (int)(1e9) + 100;
const int mod = (int)(1e9) + 7;
const int N = (int)(1e5) + 100;
string a, b;
int x[2];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> a >> b;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '4' && b[i] == '7')
      x[0]++;
    else if (a[i] == '7' && b[i] == '4')
      x[1]++;
  }
  cout << max(x[0], x[1]);
  return 0;
}
