#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int c41 = 0, c71 = 0, c42 = 0, c72 = 0;
  for (int i = 0; i < s1.length(); i++) {
    if (s1[i] == '4') {
      c41++;
    } else {
      c71++;
    }
    if (s2[i] == '4') {
      c42++;
    } else
      c72++;
  }
  int ans = 0;
  if (c41 == c42 && c72 == c71) {
    for (int i = 0; i < s1.length(); i++) {
      if (s1[i] != s2[i]) {
        ans++;
      }
    }
    ans /= 2;
  } else {
    if (c41 < c42) {
      for (int i = 0; i < s1.length() && c41 != c42; i++) {
        if (s1[i] == '7' && s2[i] == '4') {
          c41++;
          ans++;
          s1[i] = '4';
        }
      }
    } else {
      for (int i = 0; i < s1.length() && c71 != c72; i++) {
        if (s1[i] == '4' && s2[i] == '7') {
          c71++;
          ans++;
          s1[i] = '7';
        }
      }
    }
    int c = 0;
    for (int i = 0; i < s1.length(); i++) {
      if (s1[i] != s2[i]) {
        c++;
      }
    }
    ans += c / 2;
  }
  cout << ans;
  return 0;
}
