#include<bits/stdc++.h>
using namespace std;
const int INF=0x3f3f3f3f;
const int N=5e4+100;
int a[N];
int main(){
int num=0;
string s1,s2;cin>>s1>>s2;
int len=s1.length();
for(int i=0;i<len;i++){
if(s1[i]!=s2[i]){
s1[i+1]=(s1[i+1]=='*'?'o':'*');
num++;
}
}
printf("%d\n",num);
return 0;
}