#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000000,100000000000")
const long long INF = 1000000007;
const long double cp = 2 * asin(1.0);
const long double eps = 1e-9;
const long long mod = 1000000007;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  string a, b;
  int f = 0, s = 0;
  cin >> a >> b;
  for (int(i) = 0; (i) < (a.size()); i++)
    if (a[i] != b[i]) {
      if (a[i] == '4')
        f++;
      else
        s++;
    }
  cout << min(f, s) + max(f, s) - min(f, s);
  return 0;
}
