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)):

  count += s[i] != t[i]

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)):
    count += s[i] != t[i]
print(count)

-    if s[i] != t[i]: -        count += 1 +    count += s[i] != t[i]