#include <bits/stdc++.h>
using namespace std;
string a, b;
int ans;
int main() {
cin >> a >> b;
for (int i = 0; i < a.size() - 1; ++i) {
if (a[i] != b[i]) {
a[i] = b[i];
a[i + 1] = a[i + 1] == 'o' ? '*' : 'o';
ans++;
}
}
cout << ans << endl;
return 0;
}