str1 = input()
str2 = input()
# * for pos and o for neg
def getbool(ls):
ans = []
for _ in ls:
if _ == "o":
ans.append(False)
else:
ans.append(True)
return ans
str1 = getbool(str1)
str2 = getbool(str2)
# defirn two indicators
cnt = 0
for i in range(len(str1)-1):
if str1[i] != str2[i]:
str1[i] = not(str1[i])
str1[i+1] = not(str1[i+1])
cnt += 1
print(cnt)