S = eval(input())

 

count=0

for i in range(len(S)//2):

  if S[i] != S[-i-1]:

    count+=1



print(count)
s = eval(input())

n_s = s[::-1]

ans = 0

for i in range(len(s)//2):

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

        ans += 1



print(ans)

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

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

-S = eval(input()) -count = 0 -for i in range(len(S) // 2): -    if S[i] != S[-i - 1]: -        count += 1 -print(count) +s = eval(input()) +n_s = s[::-1] +ans = 0 +for i in range(len(s) // 2): +    if s[i] != n_s[i]: +        ans += 1 +print(ans)