s = eval(input())

t = eval(input())

ans = 0

for i in range(len(s)):

    if s[i] != t[i]:

        ans += 1

print(ans)

s = eval(input())

t = eval(input())



ans = 0

for i, sv in enumerate(s):

    if sv != t[i]:

        ans += 1

print(ans)

s = eval(input())
t = eval(input())
ans = 0
for i in range(len(s)):
    if s[i] != t[i]:
        ans += 1
print(ans)

s = eval(input())
t = eval(input())
ans = 0
for i, sv in enumerate(s):
    if sv != t[i]:
        ans += 1
print(ans)

-for i in range(len(s)): -    if s[i] != t[i]: +for i, sv in enumerate(s): +    if sv != t[i]: