#include <bits/stdc++.h>
using namespace std;
int moves(string s1, string s2) {
  int cnt = 0;
  for (int i = 0; i < s1.size(); i++) {
    if (s1[i] == s2[i])
      continue;
    else {
      cnt++;
    }
  }
  return cnt;
}
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int fours1 = 0, sevens1 = 0, fours2 = 0, sevens2 = 0;
  for (int i = 0; i < s1.size(); i++) {
    if (s1[i] == '7')
      sevens1++;
    else
      fours1++;
  }
  for (int i = 0; i < s2.size(); i++) {
    if (s2[i] == '7')
      sevens2++;
    else
      fours2++;
  }
  if (s1 == s2)
    cout << "0" << endl;
  else {
    int cnt = 0;
    if (sevens2 == sevens1 && fours1 == fours2) {
      cnt = moves(s1, s2);
      int ans = cnt / 2;
      cout << ans << endl;
    } else {
      if (sevens1 > sevens2) {
        int diff = sevens1 - sevens2;
        for (int i = 0; i < s1.size(); i++) {
          if (s1[i] == '7' && s2[i] == '4') {
            s1[i] = '4';
            diff--;
            cnt += 2;
            if (diff == 0) break;
          }
        }
        cnt += moves(s1, s2);
        int ans = cnt / 2;
        cout << ans << endl;
      } else {
        int diff = sevens2 - sevens1;
        for (int i = 0; i < s1.size(); i++) {
          if (s2[i] == '7' && s1[i] == '4') {
            s2[i] = '4';
            diff--;
            cnt += 2;
            if (diff == 0) break;
          }
        }
        cnt += moves(s1, s2);
        int ans = cnt / 2;
        cout << ans << endl;
      }
    }
  }
  return 0;
}
