s = eval(input())

cnt = 0

for i in range(1,len(s)//2+1):

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

        #print(s[i-1],s[-i])

        cnt += 1

print(cnt)
s = eval(input())

cnt = 0

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

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

    cnt +=1

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

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

-for i in range(1, len(s) // 2 + 1): -    if s[i - 1] != s[-i]: -        # print(s[i-1],s[-i]) +for i in range(len(s) // 2): +    if s[i] != s[-(i + 1)]: