S = eval(input())

T = eval(input())

U = S + T[::-1]

count = 0

for i in range(int(len(U)/2)):

  if U[i] != U[-(i+1)]:

    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())
U = S + T[::-1]
count = 0
for i in range(int(len(U) / 2)):
    if U[i] != U[-(i + 1)]:
        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)

-U = S + T[::-1] -for i in range(int(len(U) / 2)): -    if U[i] != U[-(i + 1)]: +for i in range(len(S)): +    if S[i] != T[i]: