s = eval(input())

n = len(s)

print((sum(t != u for t, u in zip(s[:n//2], s[-(-n//2):][::-1]))))
s = eval(input())

n = len(s)

print((sum(t != u for t, u in zip(s[:n//2], s[::-1]))))
s = eval(input())
n = len(s)
print((sum(t != u for t, u in zip(s[: n // 2], s[-(-n // 2) :][::-1]))))

s = eval(input())
n = len(s)
print((sum(t != u for t, u in zip(s[: n // 2], s[::-1]))))

-print((sum(t != u for t, u in zip(s[: n // 2], s[-(-n // 2) :][::-1])))) +print((sum(t != u for t, u in zip(s[: n // 2], s[::-1]))))