s = eval(input())

n = len(s)

ans = 0

for i in range(n // 2):

    ans += s[i] != s[n - i - 1]

print(ans)

s = eval(input())

n = len(s)

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

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

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