start_line=input()
end_line=input()
po=-1
count=0
if (start_line == end_line):
print(count)
else:
for i in range(len(start_line)):
if(start_line[i]!=end_line[i]):
if po==-1:
po=i
else:
count+=i-po
po=-1
print(count)