#include <bits/stdc++.h>
using namespace std;
string a, b;
int n, cnt, ans, res;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> a >> b;
  n = a.size();
  for (auto i : a) {
    if (i == '7') {
      ++cnt;
    }
  }
  for (auto i : b) {
    if (i == '7') {
      --cnt;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] == '7' && b[i] == '4' && cnt > 0) {
      --cnt;
      a[i] = '4';
      ++ans;
    } else if (a[i] == '4' && b[i] == '7' && cnt < 0) {
      ++cnt;
      a[i] = '7';
      ++ans;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] != b[i]) {
      ++res;
    }
  }
  cout << ans + res / 2;
}
