#include <iostream>
using namespace std;
string tmp, s;
void turn(int index){
s[index] = (s[index] == '*' ? 'o' : '*');
s[index + 1] = (s[index + 1] == '*' ? 'o' : '*');
}
int main(){
cin >> tmp >> s;
int cnt = 0;
for(int i = 0; i < s.size() - 1; i ++ ){
if(s[i] != tmp[i]){
turn(i);
cnt ++ ;
}
}
cout << cnt << endl;
}