S = eval(input())

T = eval(input())

count = 0



for i in range(len(S)):

    if S == T:

        count = 0

    else:

        if S[i] != T[i]:

            count += 1

print(count)
S = eval(input())

T = eval(input())

count = 0



for i in range(len(S)):

    if S[i] != T[i]:

        count += 1

print(count)
S = eval(input())
T = eval(input())
count = 0
for i in range(len(S)):
    if S == T:
        count = 0
    else:
        if S[i] != T[i]:
            count += 1
print(count)

S = eval(input())
T = eval(input())
count = 0
for i in range(len(S)):
    if S[i] != T[i]:
        count += 1
print(count)

-    if S == T: -        count = 0 -    else: -        if S[i] != T[i]: -            count += 1 +    if S[i] != T[i]: +        count += 1