s = eval(input())

t = eval(input())

#print(s)

#print(t)

n = 0

for i in range(0,len(s)):

  #print('i=',i)

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

    n = n + 0

  else:

    n = n + 1

print(n)
s = eval(input())

t = eval(input())

#print(s)

#print(t)

n = 0

for i in range(0,len(s)):

  #print('i=',i)

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

    n = n + 1

print(n)

s = eval(input())
t = eval(input())
# print(s)
# print(t)
n = 0
for i in range(0, len(s)):
    # print('i=',i)
    if s[i] == t[i]:
        n = n + 0
    else:
        n = n + 1
print(n)

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

-    if s[i] == t[i]: -        n = n + 0 -    else: +    if s[i] != t[i]: