#include <bits/stdc++.h>
using namespace std;
const int row = 101;
int arr[row];
inline unsigned long long power(int n) {
  if (n == 0) return 1;
  return (2 * power(n - 1));
}
inline long long GCD(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0)
    return b;
  else
    return GCD(a, b % a);
}
inline bool isprime(long long x) {
  bool f = true;
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) {
      f = false;
      break;
    }
  return f;
}
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int c1 = 0, c2 = 0;
  for (int i = 0; i < ((int)((s1).size())); i++)
    if (s1[i] != s2[i])
      if (s1[i] == '4')
        c1++;
      else
        c2++;
  cout << max(c1, c2) << endl;
  return 0;
}
