#define _CRT_SECURE_NO_WARNINGS
#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING

#include <bits/stdc++.h>

using namespace std;
char str1[1 << 10], str2[1 << 10];

int main() {
    scanf("%s%s", str1, str2);
    int ans = 0, prev = -1, len = strlen(str1);
    for (int i = 0; i < len; i++)
        if (str1[i] != str2[i])
            if (~prev)
                ans += i - prev, prev = -1;
            else
                prev = i;
    printf("%d", ans);
    return 0;
}
