#include <bits/stdc++.h>
using namespace std;
const double pi = 2 * acos(0.0);
template <typename T>
T Sqr(T x) {
  T n = x * x;
  return n;
}
template <typename T>
T Pow(T B, T P) {
  if (P == 0) return 1;
  if (P & 1)
    return B * Pow(B, P - 1);
  else
    return Sqr(Pow(B, P / 2));
}
template <typename T>
T Abs(T a) {
  if (a < 0)
    return -a;
  else
    return a;
}
template <typename T>
void Print(T ar[], int a, int b) {
  for (int i = a; i + 1 <= b; i++) cout << ar[i] << " ";
  cout << ar[b] << "\n";
}
template <typename T>
void Print(T ar[], int n) {
  for (int i = 0; i + 1 < n; i++) cout << ar[i] << " ";
  cout << ar[n - 1] << "\n";
}
template <typename T>
void Print(const vector<T> &v) {
  for (int i = 0; i + 1 < v.size(); i++) cout << v[i] << " ";
  cout << v.back() << "\n";
}
int main() {
  string a, b;
  cin >> a >> b;
  set<int> a7, a4, b7, b4;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '7')
      a7.insert(i);
    else
      a4.insert(i);
  }
  for (int i = 0; i < b.size(); i++) {
    if (b[i] == '7')
      b7.insert(i);
    else
      b4.insert(i);
  }
  int ans = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == b[i]) {
      if (a[i] == '4') {
        a4.erase(i);
        b4.erase(i);
      } else {
        a7.erase(i);
        b7.erase(i);
      }
    } else {
      if (a[i] == '4') {
        int cur = -1;
        for (auto it : a7) {
          if (a[it] != b[it]) {
            cur = it;
            break;
          }
        }
        if (cur == -1) {
          ans++;
          a4.erase(i);
          b7.erase(i);
        } else {
          swap(a[i], a[cur]);
          a4.erase(i);
          b4.erase(i);
          a7.erase(cur);
          a4.insert(cur);
          ans++;
        }
      } else {
        int cur = -1;
        for (auto it : a4) {
          if (a[it] != b[it]) {
            cur = it;
            break;
          }
        }
        if (cur == -1) {
          ans++;
          a7.erase(i);
          b4.erase(i);
        } else {
          swap(a[i], a[cur]);
          a7.erase(i);
          b7.erase(i);
          a4.erase(cur);
          a7.insert(cur);
          ans++;
        }
      }
    }
  }
  cout << ans << "\n";
  return 0;
}
