#include <bits/stdc++.h>
using namespace std;
map<long long int, long long int> mp, mk;
set<long long int> s1, s2;
vector<int> v, w;
string s = "", qq = "", ss = "", pp = "", p, q;
char ch;
long long int m, n, i, j, l, r, x, t, y, u, g, h, mn, mx, d, z, c, f, e, k;
int main() {
  cin >> s >> p;
  for (i = 0; i < s.size(); i++) {
    if (s[i] != p[i]) {
      if (s[i] == '4')
        c++;
      else
        d++;
    }
  }
  cout << max(c, d);
}
