#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int res = 0;
string s1, s2;
cin >> s1 >> s2;
for (int i = 0; i < s1.size() - 1; i++)//每次翻动当前和它后面的一个硬币,所以到倒数第二个硬币的时候就已经翻转完成了
{
if (s1[i] != s2[i])
{
res++;
if (s1[i] == '*') s1[i] = 'o';
else s1[i] = '*';
if (s1[i+1] == '*') s1[i+1] = 'o';
else s1[i+1] = '*';
}
}
cout << res << endl;
}